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

zasm - Z80 Assembler – Version 4.4

Targets

#target TZX

0x11: Turbo speed data block

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

This defines a Assembler directives: #code
Including C Source Files: #code
#code segment which is stored with the standard ZX Spectrum tape encoding scheme but with different timings. The 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. Any following Assembler directives: #code
Including C Source Files: #code
#CODE segments with no FLAG are combined with this segment to form the full tzx code 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: Pseudo instructions: defl, set and '='
Labels: SET
Set the number of pilot pulses 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.

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 turbo, my_name, my_address, my_length, flag=$aa, 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