Assembler

The Astrum assembler is a two pass assembler which means it goes through the source code twice. On the first pass it syntax checks the source code and determines the code layout and in particular the value of each label. The second pass generates the machine code and data. The resulting machine code and data are written to the filestore. If your source file is game.asm then by default the written file will be game.bin. You can change this with the OUTPUT assembler command. At present the output file is the output from the assembler, there is no header and can be loaded with LOAD "game.bin" CODE $e000 type statements.

The assembler can be in either upper or lower case but labels and symbols are case dependent. So FLAGS and flags are different symbols. In general you should avoid using labels or symbols that are the same as Z80 registers in either letter case. On thing to be aware of is using a bracket at the start of a constant expression. For example:

     ld bc,(END_SYM-START_SYM)/3
The start bracket makes Astrum think we are loading BC from memory when really we are loading a constant. This will produce a syntax error because the /3 looks extraneous. To get around this example add a leading +:
     ld bc,+(END_SYM-START_SYM)/3
This Next version of the assembler has been upgraded to include: