The target for this source is Pseudo instructions: defl, set and '=' Labels: SETset by the Assembler directives: #target Including C Source Files: #target#target assembler directive. Available targets are:
bin rom sna Command Line Options: --z80 Pseudo instructions: .z80, .z180 and .8080 Targets: #target Z80z80 tap ace o 80 p 81 p81
The target also defines the default file name extension for the output file. Targets bin and rom can also be written in Intel Hex or Motorola S-Record format, Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif the Differences from v3 to v4: Command line options Command Line Options Command Line Options: Command line optionscommand line options '-x' or '-s' are given.
Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifIf a target is defined, then at least one Assembler directives: #code Including C Source Files: #code#code segment must be defined as well. Depending on the target more may be required and certain additional requirements may apply.
Instead of using the Assembler directives: #target Including C Source Files: #target#target/Assembler directives: #code Including C Source Files: #code#code metapher, simple projects may omit them and just define an origin before the first actual code.
#insert: Examples: #assert: Example: incbin: Examples: #assert: Example:Example:
#target rom
Assembler directives: #code Including C Source Files: #code#code _EPROM,0,0x2000
reset: di
jp _init
...
The target file format must be Pseudo instructions: defl, set and '=' Labels: SETset with the Assembler directives: #target Including C Source Files: #target#target assembler directive.
Assembler directives: #target Including C Source Files: #target#target <extension>
This does not define whether the generated data should be written as a plain binary file or in one of the hex file formats. This must be selected by the '-x' or '-s' Differences from v3 to v4: Command line options Command Line Options Command Line Options: Command line optionscommand line option. The assembler defaults to a binary file.
Assembler directives: #code Including C Source Files: #code#code <name>, <start>, <size> [,<flag>]
This directive defines an object code segment and Pseudo instructions: defl, set and '=' Labels: SETset's the physical and the initial logical code address to <start> and defines a maximum segment size <size>.
<start> does not define the position of the code in the output file. It should define the address where this segment is visible to the cpu.
Multiple code segments are possible and are simply concatenated. Code segments are either padded at the Pseudo instructions: end, .end 8080 pseudo instructions: ENDend to the declared maximum size or they are truncated after the last byte stored, Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif the size is omitted.
|