<--  back   Last regenerated: 2022-04-20 17:31:36 kio

zasm - Z80 Assembler – Version 4.4

Targets

#target TZX

Using standard encoding scheme and timing

A TZX file represents what is audible on the tape, not neccessarily a specific meaning for the pulses. Therefore it is possible that the first byte recorded on tape is not a #code: Flag Byte
#code: Flag Byte
flag byte and the last byte is not the standard checksum and even some odd bits may appear at the Pseudo instructions: end, .end
8080 pseudo instructions: END
end of a block which do not sum up to a full byte. You probably won't need these fancy options, therefore they are all optional.

#target TZX introduces a new syntax for optional arguments which is shown below in the second version of the Assembler directives: #code
Including C Source Files: #code
#code directive. The square brackets indicate optionality. Round brackets with a vertical bar somewhere in the middle indicate a choice. Keywords are written in uppercase, but are also recognized in lowercase by the assembler.

Assembler directives: #code
Including C Source Files: #code
#CODE name, address, length, flag Assembler directives: #code
Including C Source Files: #code
#CODE name, address, length, FLAG=(flag|NONE), [PILOT=(NONE|count)], [CHECKSUM=NONE|ACE], [LASTBITS=lastbits], [PAUSE=pause]

FLAG: The value for the #code: Flag Byte
#code: Flag Byte
flag byte is in range 0 to 255. Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If the keyword NONE is used then zasm does not store a #code: Flag Byte
#code: Flag Byte
flag byte at the start of the tape block.

PILOT: Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If Pseudo instructions: defl, set and '='
Labels: SET
set to NONE then no pilot tone and no sync pulses are stored. Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If a number is given, then a pilot tone with that number of pulses is stored. The default is to store a data block which includes a pilot tone with 8063 or 3223 pulses depending on the #code: Flag Byte
#code: Flag Byte
flag byte.

CHECKSUM: Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If Pseudo instructions: defl, set and '='
Labels: SET
set to NONE then zasm will append no checksum after the data. The default is to append the standard ZX Spectrum checksum.

LASTBITS: The number of bits actually played from the last byte. Possible values are from 1 to 8. The upper bits of the last byte are used, because the bits were sent from msb to lsb by the ZX Spectrum tape routine. Use of this option is incompatible with a checksum. Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If LASTBITS is omitted, then the last byte is stored (and played) as usual.

PAUSE: Length of the silent gap after this block in ms. Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If PAUSE is omitted then the default is 1000ms after a header block and 2000ms after a data block.

Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If CHECKSUM=ACE is defined, then some default values are changed:
• The checksum is calculated for the Jupiter Ace.
• Number of pilot pulses: 8192 (header) or 1024 (data).
• Length of pilot pulse, sync pulses and data pulses.
• Duration of pause after this block: 2ms (header) or 1s (data).
note: Do not Pseudo instructions: defl, set and '='
Labels: SET
set FLAG=NONE as for Assembler directives: #target
Including C Source Files: #target
#target tap: In Jupiter-Ace .tap-files the #code: Flag Byte
#code: Flag Byte
flag byte is actually not written, but in .tzx files it is!

Examples for code blocks with standard timing:

Using the same Assembler directives: #code
Including C Source Files: #code
#code directive as for Assembler directives: #target
Including C Source Files: #target
#target TAP will result in a standard speed data block. So migrating a source from Assembler directives: #target
Including C Source Files: #target
#target TAP to #target TZX is just a matter of changing the Assembler directives: #target
Including C Source Files: #target
#target directive:

Assembler directives: #code
Including C Source Files: #code
#CODE name,address,length,flag

A data block with some non-standard settings:

Assembler directives: #code
Including C Source Files: #code
#CODE name,address,length, FLAG=10, CHECKSUM=NONE, PAUSE=100

A data block with a short pilot tone:

#CODE name,address,length, FLAG=255, PILOT=999, PAUSE=100

Valid HTML   Valid CSS