Prev: 16384 Up: Map Next: 23375
23296: Tape Loader
Load the first block: screen data.
TapeLoader 23296 LD IX,16384 IX=16384.
23300 LD DE,6912 DE=6912.
23303 LD A,91 A=91.
23305 CALL TapeLoading Call TapeLoading.
Load the second block: graphics data.
23308 LD IX,24700 IX=24700.
23312 LD DE,22996 DE=22996.
23315 LD A,225 A=225.
23317 CALL TapeLoading Call TapeLoading.
Load the third block: game data.
23320 LD IX,47696 IX=47696.
23324 LD DE,17778 DE=17778.
23327 LD A,33 A=33.
Tape loading routine.
TapeLoading 23329 SCF Set the carry flag to indicate "loading".
23330 INC D This resets the Z flag. (D cannot hold +255.)
23331 EX AF,AF' The A register holds +0 for a header and +255 for a block of data. The carry flag is reset for verifying and set for loading.
23332 DEC D Restore D to its original value.
23333 DI Disable interrupts.
23334 LD A,15 Set the border to WHITE.
23336 OUT (254),A
23338 CALL 1378 Call LD_BYTES#1378.
23341 PUSH AF Stash AF on the stack.
23342 LD A,(23624) A=*BORDCR.
23345 AND %00111000 Keep only bits 3-5.
23347 RRC A Rotate A right (with carry).
23349 RRC A
23351 RRC A
23353 OUT (254),A Set border to the colour held by A.
23355 LD A,127 A=127.
23357 IN A,(254) Make an initial read of port '254'.
23359 RRA Rotate the byte obtained.
23360 EI Enable interrupts.
23361 JP NC,0 Jump to START if the carry flag is not set.
23364 POP AF Restore AF from the stack.
23365 RET C Return if the carry flag is set.
23366 LD HL,(23635) Write *PROG to *VARS.
23369 LD (23627),HL
23372 LD (HL),128 Write 128 to *PROG.
23374 RST 8 Call ERROR_1.
View the equivalent code in Warlord.
Prev: 16384 Up: Map Next: 23375