Assembler directives: #target Including C Source Files: #target#target <name>
The Assembler directives: #target Including C Source Files: #target#target directive defines the kind of output file. Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifIf no Assembler directives: #target Including C Source Files: #target#target directive is given in the source, then zasm will default to a rom file. The Assembler directives: #target Including C Source Files: #target#target directive must occur before any Assembler directives: #code Including C Source Files: #code#code definition and any opcode. Best put it directly at the start of the source. The <name> defines the extension of the output file. Depending on the desired target your source must consist of multiple Assembler directives: #code Including C Source Files: #code#code segments. See section about target files. The Assembler directives: #target Including C Source Files: #target#target directive is required Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif you include c source files, because the c compiler requires code and data segments.
<name> is one of:
ram plain binary data, presumably to be loaded into ram
bin old name for target 'ram'
rom plain binary data, presumably for a rom
sna ZX Spectrum NMI snapshot
Command Line Options: --z80 Pseudo instructions: .z80, .z180 and .8080 Targets: #target Z80z80 ZX Spectrum snapshot
tap ZX Spectrum or Jupiter Ace tape file
o ZX80 tape file
80 ZX80 tape file
p ZX81 tape file
81 ZX81 tape file
p81 ZX81 tape file
ace Jupiter Ace snapshot file
Only target ram and rom can be written as Intel hex or Motorola S-Record file. All other file types can only be written as binary file. This is controlled by the comand line options '-x' or '-s'.
Simple source file example:
#target rom
;
Assembler directives: #code Including C Source Files: #code#code _ROM0,0,4000h
;
; <-- your code goes here -->
;
#end
|