Prev: 33775 Up: Map Next: 33971
33873: Load Game
LoadGame 33873 PUSH IX Stash IX and DE on the stack.
33875 PUSH DE
Load "flags".
33876 LD A,255 Set the load as a "data block".
33878 SCF Set the carry flag.
33879 LD IX,46827 Set the start address to; 46827.
33883 LD DE,29 Set the block length to; $001D bytes.
33886 CALL LoadBlock Call LoadBlock.
Load "objects".
33889 LD A,255 Set the load as a "data block".
33891 SCF Set the carry flag.
33892 LD IX,49435 Set the start address to; Objects.
33896 LD DE,1557 Set the block length to; $0615 bytes.
33899 CALL LoadBlock Call LoadBlock.
Load...
33902 LD A,255 Set the load as a "data block".
33904 SCF Set the carry flag.
33905 LD IX,51844 Set the start address to; 51844.
33909 LD DE,191 Set the block length to; $00BF bytes.
33912 CALL LoadBlock Call LoadBlock.
Load "locations".
33915 LD A,255 Set the load as a "data block".
33917 SCF Set the carry flag.
33918 LD IX,47754 Set the start address to; Locations.
33922 LD DE,1497 Set the block length to; $05D9 bytes.
33925 CALL LoadBlock Call LoadBlock.
Success!
33928 DI Disable interrupts.
33929 LD HL,46827 Call ThreeByteCopy using HL=46827 and DE=$C9E2.
33932 LD DE,51682
33935 CALL ThreeByteCopy
33938 POP DE Restore DE and IX from the stack.
33939 POP IX
33941 JP 33459 Jump to 33459.
Load Block
LoadBlock 33944 CALL 1366 Call LD_BYTES.
33947 RET C Return if the carry flag is set.
33948 LD A,1 Write $01 to WaitCoutdown.
33950 LD (46849),A
33953 LD HL,45911 HL="tape error - hit any key to restart program[0x15]"
33956 CALL PrintMsg Call PrintMsg.
LoadBlock_Loop 33959 XOR A Read from the keyboard port.
33960 IN A,(254)
33962 AND %00011111 A pressed key from any line will set its respective bit; bit 0 (outer key) to bit 4 (inner key). Hence keep only bits 0-4 for the check.
33964 CP 31 Loop back to LoadBlock_Loop until any key has been pressed.
33966 JR Z,LoadBlock_Loop
33968 JP ReStart Jump to ReStart.
Prev: 33775 Up: Map Next: 33971