flat assembler
Message board for the users of flat assembler.
Index
> Main > Compiler construction |
Author |
|
vid 12 Feb 2005, 18:10
maybe privalov could have some experiences with somthing like that, but i am not sure.
|
|||
12 Feb 2005, 18:10 |
|
bubach 12 Feb 2005, 18:17
He may have..
But on the other hand, it for HLL languages which may be very diffrent to write a compiler for. I don't really know if my future compiler should produce an .asm file or if i somehow should include fasm in my compiler? Or if I should try and make a "macro-compiler" instead.. |
|||
12 Feb 2005, 18:17 |
|
Tomasz Grysztar 12 Feb 2005, 18:59
One of my intentions when designing fasm was to make it a good back-end for the HLL compilers. I had made my first assembler when trying to write my own HLL compiler in 1998, but that project was never finished. However later, when I concentrated on fasm development, some other programmers started to use fasm for this purpose. The first such compiler was the B-Flat by Ken Martwick (he also helped me with writing the very first documentation for fasm), since it's open-source I'm attaching it here - maybe you will find it useful, but this project never grown up.
|
|||||||||||
12 Feb 2005, 18:59 |
|
crc 12 Feb 2005, 19:09
A Forth compiler is easy to implement
|
|||
12 Feb 2005, 19:09 |
|
bubach 12 Feb 2005, 20:22
Thanks Privalov, but is seems like it's written in C (quick look). Can't see any connection to fasm.. I'll take a closer look.
Maybe I should download RetroForth and see if I can learn something.. |
|||
12 Feb 2005, 20:22 |
|
beppe85 12 Feb 2005, 22:28
I think it would be better to generate assembly and pass it to a dll built from fasm. So we could use the last fasm version without having to rebuild the compiler.
If you can, read "Modern Compiler Implementation in C" by Andrew Appel. I prefer the Java version, but C resembles more asm than does Java. I have some knownledgement about the matter, but never wrote a compiler in a traditional imperative fashion, but maybe I could help you. First define simple. It should be simple to build, make simple optimizations, fast or what? You want to use compiler-compiler tools(i'm not aware it they exist for asm), or wnat to hand-code all? _________________ "I assemble, therefore I am" If you got some spare time, visit my blog: http://www.beppe.theblog.com.br/ and sign my guestmap |
|||
12 Feb 2005, 22:28 |
|
iklin 13 Feb 2005, 09:10
There is Flat C written in Fasm. It's russian site. And implementation is not so good. It's only changed fasm sources.
http://www.compilers.narod.ru/proj.html So... Time to time I'm working on such things and now have a great collection of docs. If you are so interesting I'll make a list of all of docs, links and stuffs and post it here. Some times later... |
|||
13 Feb 2005, 09:10 |
|
bubach 13 Feb 2005, 14:12
Thanks.. I would glady take any links you may have..
I found some compiler compilers on the net, but i prefer building it myself. Building it to asm sources firt may be the best idea, that way we could see excatly what the compiler produces.. I am thinking of how I could make it possible to change syntax for diffrent languages, like between C and Pascal. |
|||
13 Feb 2005, 14:12 |
|
beppe85 13 Feb 2005, 15:23
bubach wrote: I am thinking of how I could make it possible to change syntax for diffrent languages, like between C and Pascal. You mean a compiler like GCC? In this case, you have well-delineated front- and back-end's. You'll need a intermediate representation of source, it should not be nor source language nor target machine dependent, or all source languages or all target machines have some in common. FASM uses a flat representation(still text), but other representations include AST(abstract syntax tree), and triples and quadruples(arrays of record with 3/4 fields) _________________ "I assemble, therefore I am" If you got some spare time, visit my blog: http://www.beppe.theblog.com.br/ and sign my guestmap |
|||
13 Feb 2005, 15:23 |
|
iklin 14 Feb 2005, 18:17
Quote: I am thinking of how I could make it possible to change syntax for diffrent languages, like between C and Pascal. Look at this - http://home.perm.ru/~strannik/ - a strange C-Pascal-Modula compiler. And this - http://yallie.narod.ru/ - is another good place with many links. And this - http://webster.cs.ucr.edu/ - if you don't know! There is a tutorial for writing assembler. And this - http://compilers.iecc.com/crenshaw/ - it's a classic tutorial! And this - http://www.compilerconnection.com/books/books.htm - is interesting. Sorry, now I'm too busy and just now I'm hurry... |
|||
14 Feb 2005, 18:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.