Programming: The Zues Z80 Assembler


A Z80 Assembler which can generate Motorola S1, S2 and S3 records.

I wrote ZUES a couple of years ago in preperation for this project, since then its been extensivly tested (using an exhaustive approach), and ported onto several architectures (SUN, Intel, Motorola). Its written in C and should compile on any SVR4 platform. One platform I've not tested it on is LINUX, this would probably need to have the Makefiles altered to use FLEX and BISON.

ZUES takes standard ZILOG assembler and passes it through cpp so you can use standard C #defines, file inclusion, macros etc. The parser understands the output from cpp so it won't get lost and will report errors in the correct place at the correct line.

ZUES is a multiple pass assembler, but dislikes forward-references (it will do them but you have been warned). This is because I'd not figured out how to use a symbol-table properly when I wrote ZUES, unlike the ZEN compiler (a single pass C compiler I've written to generate Three Address Code/Z80 code - currently being altered to generate Pseudo C)

Compiling ZUES is straightforward but the parser (yaccin.y) generates a lot of shift-reduce conflicts, this is redundant code thats not been weeded out - don't worry about it. Nothing else should generate either warnings or errors under cc or gcc. I've thought about redesigning ZUES to use the latest parser, symbol-table and memory mapping techniques I've subsequently learned but I cant get it to generate incorrect output files so theres not much point.

Theres not much documentation at all, a good book on Z80 assembler is The Z80 Reference Guide. To offset this lack of documentation the tar file of ZUES contains lots of test and useful assembler code for your perusal.

If you still want ZUES download the GZIPPED tar file of the source: zues.tar.gz. If you find it useful or have comments or suggestions (bug-reports ?) then e-mail jpg@janus.demon.co.uk.

If you dont have cpp then e-mail WebMaster@janus.demon.co.uk and I'll send you the earlier version of ZUES which didn't use it, please state whether you want it Base 64 or UU encoded.



Back to main Alife Index
Back to main Index