Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: [project] MSX (Z80) Pascal compiler

  1. #1

    [project] MSX (Z80) Pascal compiler

    I don't know if there's any MSX owner here, but I decided to write a MSX Pascal compiler. That's why:

    After finish a fair stable game library (Allegro.pas, test it if you didn't! ) I decided to step back to my origins: the good old MSX system. I almost forget everything about Z80 microprocessor and the MSX hardware, so I looked for information and I found some C and Pascal compilers for Z80 (Did you know there were a Turbo Pascal for MSX? Me didn't!), but that compilers where discontinued, closed and/or non-free.

    So here I am with this new bizarre idea. :roll: The objective for version 1.0 is to build a compiler for simple Pascal programs, non Object Pascal, non optimized code, etc. I think I can do it because “simple Pascal” isn't too complex to parse, is it? I never did a compiler before but I did a small script interpretor and a complete math analyzer some time ago. And that wasn't so hard as it seems.

    I wrote a brief description about what I want to do. If somebody else has interest or is curious about this project (retro game lovers, where are you? :mrgreen, I'll answer your questions. Any comment and suggestion will be welcome too.
    No signature provided yet.

  2. #2

    [project] MSX (Z80) Pascal compiler

    I don't have a MSX but I used to own a ZX-Spectrum which was a great little Z80-based computer. And I think all retro-projects like yours are really cool, so I say go for it!
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    [project] MSX (Z80) Pascal compiler

    You might want to check out 'Let's Build a Compiler' by Jack Crenshaw. I found it easy to follow and all the code is in Pascal (uses Turbo Pascal dialect for all the code examples and is 100% compatible in FPC with little or no exceptions needed)
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4

    [project] MSX (Z80) Pascal compiler

    Quote Originally Posted by WILL
    You might want to check out 'Let's Build a Compiler' by Jack Crenshaw. I found it easy to follow and all the code is in Pascal (uses Turbo Pascal dialect for all the code examples and is 100% compatible in FPC with little or no exceptions needed)
    LOL! You beat me to that...I was going to post that link myself as I have used it to make a scripting language 'compiler' before in the past

    I second that recommendation ;-)

    cheers,
    Paul

  5. #5

    [project] MSX (Z80) Pascal compiler

    Thanks for your comments
    Quote Originally Posted by WILL
    You might want to check out 'Let's Build a Compiler' by Jack Crenshaw...
    I did read it some time ago. I'll keep a copy as reference for some tasks but I'll try an object oriented approach.

    Now, I decided to do the compiler more generic, so it can be used with other Z80 based devices (i.e. ZX-Spectrum and several 8bit game devices). I think I'll start coding it this night.
    No signature provided yet.

  6. #6

    [project] MSX (Z80) Pascal compiler

    SourceForge did accept the project, so if you have interest about it, visit it's project page and add the RSS feed to your RSS reader.
    No signature provided yet.

  7. #7

    [project] MSX (Z80) Pascal compiler

    Good luck with the project.

    I don't know if you're aware of this website[/url], but it has a Pascal version of Lex and Yacc which you may find useful.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  8. #8

    [project] MSX (Z80) Pascal compiler

    Thanks for the reply, pstudio. I did use Yacc some years ago and I don't like it. I know it's a great application and Free Pascal is written using it, but I don't understand most of its logic and I can't see how to write a compiler using it. I like recursive parsers as Creenshaw suggest in his articles.
    No signature provided yet.

  9. #9

    [project] MSX (Z80) Pascal compiler

    Coco/R saves time when writing recursive parsers. It works with a definition file just like yacc/lex, but with the great benefit that the generated code is readable and easy to debug.

    http://tetzel.com/cocor/coco-r-for-delphi/
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  10. #10

    [project] MSX (Z80) Pascal compiler

    I'll study it. Thank you, VilleK.
    No signature provided yet.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •