|
#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: SETset 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 Byteflag byte is in range 0 to 255. Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifIf the keyword NONE is used then no #code: Flag Byte #code: Flag Byteflag byte is stored in the tape file.
PILOT: The number of pilot pulses is Pseudo instructions: defl, set and '=' Labels: SETset to the given number. This overrides the default of 8063 or 3223 pulses.
CHECKSUM: Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifIf Pseudo instructions: defl, set and '=' Labels: SETset to NONE then zasm will append no checksum after the data. Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifIf Pseudo instructions: defl, set and '=' Labels: SETset 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, endifIf LASTBITS is omitted, then the last byte is stored (and played) as usual. Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifIf 2- or 4-bit data symbols are used (Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif 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, endifIf 8-bit data symbols are used (Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif 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, endifIf 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
| |