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

zasm - Z80 Assembler – Version 4.4

Targets

#target TZX

0x19: Generalized data block

#TZX GENERALIZED, name, address, length, FLAG=(flag|NONE), [PILOT=(NONE|count)], [CHECKSUM=NONE|ACE],  [LASTBITS=lastbits], [PAUSE=pause]

This defines a Assembler directives: #code
Including C Source Files: #code
#code segment which is stored with a custom encoding scheme. The encoding scheme and pulse timings can be Pseudo instructions: defl, set and '='
Labels: SET
set with .tzx- pseudo opcodes as described above. This segment can be re-entered using directive Assembler directives: #code
Including C Source Files: #code
#CODE
or pseudo opcode .AREA. Following Assembler directives: #code
Including C Source Files: #code
#CODE segments without FLAG are appended to this segment to form a full tzx data block.

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 no #code: Flag Byte
#code: Flag Byte
flag byte is stored in the tape file.

PILOT: The number of pilot pulses is Pseudo instructions: defl, set and '='
Labels: SET
set to the given number. This overrides the default of 8063 or 3223 pulses.

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. Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If Pseudo instructions: defl, set and '='
Labels: SET
set to ACE then a Jupiter Ace checksum will be calculated. 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. Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If 2- or 4-bit data symbols are used (Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
if 4 or 16 data symbols were defined) then LASTBITS must be a multiple of 2 or 4. Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
If 8-bit data symbols are used (Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
if 256 data symbol were defined) then LASTBITS must be a multiple of 8 which means, yes, it must be 8.

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 (header) or 2000ms (data).

#insert: Examples:
#assert: Example:
incbin: Examples:
#assert: Example:
Example: Turbo speed block

#tzx generalized, my_name, my_address, my_length, flag=$ee, pause=150
    .tzx-pilot-sym  0, 900          ; symbol#0 for pilot pulses
    .tzx-pilot-sym  0, 300,400      ; symbol#1 for sync pulses (two pulses)
    .tzx-pilot      0,1520, 1,1     ; 1520 pilot pulses (symbol#0), then one sync pulse symbol (symbol#1)
    .tzx-data-sym   0, 290,290      ; symbol#0 for bit 0
    .tzx-data-sym   0, 580,580      ; symbol#1 for bit 1
    ;
    ; machine code follows

Valid HTML   Valid CSS