Prev: 51043 Up: Map Next: 51141
51098: Pause game routine - save the current game
This routine is triggered if the player presses 'S' while the game is paused, in the previous routine keyboard check at 51053.
Data block 1:
51098 LD A,255 Indicates this is a data block to save
51100 LD IX,60064 Start address of data block to save
51104 LD HL,60577 End address of data block
51107 LD DE,60064 Start address of data block
51110 SCF Set the carry flag
51111 CCF Then toggle it, to clear it
51112 SBC HL,DE Subtract data start address from end address
51114 INC HL
51115 EX DE,HL ...DE now contains the number of bytes in this data block = 514 bytes
51116 CALL 1218 Call the ROM routine to save this data block to tape
Data block 2:
51119 LD A,255 Indicates this is a data block to save
51121 LD IX,(56053) Start address of data block to save (26512)
51125 LD HL,(60257) End address of data block (32851)
51128 LD DE,(56053) Start address of data block
51132 SCF Set the carry flag
51133 CCF Then toggle it, to clear it
51134 SBC HL,DE Subtract data start address from end address
51136 INC HL
51137 EX DE,HL ...DE now contains the number of bytes in this data block = 6340 bytes
51138 CALL 1218 Call the ROM routine to save this data block to tape
The game is now saved - continue to the next routine (pause game), and the game will resume once the player presses 'resume'.
Prev: 51043 Up: Map Next: 51141