Prev: 4000 Up: Map Next: 5B4F
5B00: Tape Loader
Load the first block: screen data.
TapeLoader 5B00 LD IX,$4000 IX=4000.
5B04 LD DE,$1B00 DE=1B00.
5B07 LD A,$52 A=52.
5B09 CALL TapeLoading Call TapeLoading.
Load the second block: graphics data.
5B0C LD IX,$61A8 IX=Image_WoodedVale.
5B10 LD DE,$4389 DE=4389.
5B13 LD A,$2A A=2A.
5B15 CALL TapeLoading Call TapeLoading.
Load the third block: game data.
5B18 LD IX,$A531 IX=GameEntryPoint.
5B1C LD DE,$5A27 DE=5A27.
5B1F LD A,$A0 A=A0.
Tape loading routine.
TapeLoading 5B21 SCF Set the carry flag to indicate "loading".
5B22 INC D This resets the zero flag. (D cannot hold +FF.)
5B23 EX AF,AF' The A register holds +00 for a header and +FF for a block of data. The carry flag is reset for verifying and set for loading.
5B24 DEC D Restore D to its original value.
5B25 DI Disable interrupts.
5B26 LD A,$0F Set the border to WHITE.
5B28 OUT ($FE),A
5B2A CALL $0562 Call LD_BYTES#0562.
5B2D PUSH AF Stash AF on the stack.
5B2E LD A,($5C48) A=*BORDCR.
5B31 AND %00111000 Keep only bits 3-5.
5B33 RRC A Rotate A right (with carry).
5B35 RRC A
5B37 RRC A
5B39 OUT ($FE),A Set border to the colour held by A.
5B3B LD A,$7F A=7F.
5B3D IN A,($FE) Make an initial read of port 'FE'.
5B3F RRA Rotate the byte obtained.
5B40 EI Enable interrupts.
5B41 JP NC,$0000 Jump to START if the carry flag is not set.
5B44 POP AF Restore AF from the stack.
5B45 RET C Return if the carry flag is set.
5B46 LD HL,($5C53) HL=*PROG.
5B49 LD ($5C4B),HL Write HL to *VARS.
5B4C LD (HL),$80 Write 80 to *HL.
5B4E RST $08 Call ERROR_1.
View the equivalent code in The Jewels Of Babylon.
Prev: 4000 Up: Map Next: 5B4F