Prev: C763 Up: Map Next: C7C5
C79A: 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 C76D.
Data block 1:
C79A LD A,$FF Indicates this is a data block to save
C79C LD IX,$EAA0 Start address of data block to save
C7A0 LD HL,$ECA1 End address of data block
C7A3 LD DE,$EAA0 Start address of data block
C7A6 SCF Set the carry flag
C7A7 CCF Then toggle it, to clear it
C7A8 SBC HL,DE Subtract data start address from end address
C7AA INC HL
C7AB EX DE,HL ...DE now contains the number of bytes in this data block = 514 bytes
C7AC CALL $04C2 Call the ROM routine to save this data block to tape
Data block 2:
C7AF LD A,$FF Indicates this is a data block to save
C7B1 LD IX,($DAF5) Start address of data block to save (6790)
C7B5 LD HL,($EB61) End address of data block (8053)
C7B8 LD DE,($DAF5) Start address of data block
C7BC SCF Set the carry flag
C7BD CCF Then toggle it, to clear it
C7BE SBC HL,DE Subtract data start address from end address
C7C0 INC HL
C7C1 EX DE,HL ...DE now contains the number of bytes in this data block = 6340 bytes
C7C2 CALL $04C2 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: C763 Up: Map Next: C7C5