Writing my first compiler

Yarrago@hotmail.com (Yarrago)
17 Mar 2002 22:08:50 -0500

          From comp.compilers

Related articles
Writing my first compiler Yarrago@hotmail.com (2002-03-17)
Re: Writing my first compiler joachim_d@gmx.de (Joachim Durchholz) (2002-03-19)
Re: Writing my first compiler missoulaleo@DIE_SPAMBOT_DIEearthlink.net (john thrum) (2002-03-19)
Re: Writing my first compiler dobes@dobesland.com (Dobes Vandermeer) (2002-03-21)
| List of all articles for this month |

From: Yarrago@hotmail.com (Yarrago)
Newsgroups: comp.compilers
Date: 17 Mar 2002 22:08:50 -0500
Organization: http://groups.google.com/
Keywords: question, comment
Posted-Date: 17 Mar 2002 22:08:50 EST

I have recently taken on the task of writing a compiler. I'm not after
a flash optimising compiler as my first compiler, just a basic one
that outputs executes and allows me to learn some how write a
compiler, later of I may write a more correct compiler but for now
it's just for learning purposes. Anyway I think that I can handle the
front end however the backend is causing me a bit of concern. I want
my compiler to output 16bit dos exe's. I have several books on the
topic however they only cover writing a compilers backend up to the
assembly stage; I want to go the final step and output exe's. Would
it be best if I write an assembler or just integrate this into the
back end? Are there any source that anyone could recommend that would
help me with this final step in either writing an assembler or adding
the execute output to the backend of my compiler? Is an assembler
basically a matter of converting the mnemonics into opcodes and
linking the file with a header to make it into an execute or is there
more to it?

Thanks For Any Help YARRAGO.
[Basic assemblers are pretty easy, although you can make them as hard as
you want by adding conditional assembly, macros, link-time expression
evaluation, and a raft of other stuff, now largely forgotten since
assemblers are now mostly used to assemble compiler output rather than
hand-written code. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.