Thread: "Writing Compilers and Interpreters"

  1. #1
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428

    "Writing Compilers and Interpreters"

    anyone know anything about this book? It looks pretty good, and there were some good reviews for it. I put it on my christmas list . Anywho, you can find the code for the actual PASCAL compiler and interpreter that you make online...so I got it, compiled the compiler, and finally got it working. It produces an asm file...and im wondering, does anyone know an assembler that can make an exe file out of it? Ive tried a bunch, but they just flag up a bunch of errors and stuff...I think someone said that it makes 8086 Assmebly or something (which I got assemblers for, but non seemed to work, although I dont know much about ASM) so, anyone know where I can get an assembler or whatever I need for it? thanks

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    I don't know the book, or the software you are talking about, but typically, a compiler, or an assembler will produce what is called "relocatable object code", normally it is the linker that converts relocatable addresses to a definite offset in the final executable, (the compiler/assembler cannot do this since it would not be aware of the sizes of external elements that it had referenced).

    I suspect you will need to pass this output file through a linker, or if not, a simpler piece of software called a locater, which can convert relocatable references to fixed offsets, but will not include other object files.

    What does it tell you to do in the book?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    I dont actually have the book yet, but I may be getting it for christmas. Maybe it will explain all I need...

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    I have shareware software that can turn it into a .COM file. Its should be just about the same thing. Email me at [email protected] if you're interested.

    Sean Mackrory.

Popular pages Recent additions subscribe to a feed