![]() |
Routines |
| Prev: 44137 | Up: Map | Next: 44200 |
|
Used by the routines at Action_Save and Action_Quit.
Copy the configurable exits into the save buffer and write them to tape.
|
||||
| SaveGame | 44141 | LD A,(44794) | Read the configurable-exit count into A. | |
| 44144 | OR A | Jump to SaveGame_StartTape if A is zero. | ||
| 44145 | JR Z,SaveGame_StartTape | |||
|
B counts the exits, IX walks their addresses and DE the save buffer.
|
||||
| 44147 | LD B,A | Take the exit count and point at the exit table and the save buffer. | ||
| 44148 | LD IX,(44774) | |||
| 44152 | LD DE,44699 | |||
| 44155 | JR SaveGame_0 | Start with the first configurable exit. | ||
| SaveGame_CopyExit | 44157 | INC IX | Copy each configurable exit's current destination into the save buffer. | |
| 44159 | INC IX | |||
| 44161 | INC DE | |||
| SaveGame_0 | 44162 | LD L,(IX+0) | ||
| 44165 | LD H,(IX+1) | |||
| 44168 | LD A,(HL) | |||
| 44169 | LD (DE),A | |||
| 44170 | DJNZ SaveGame_CopyExit | |||
| SaveGame_StartTape | 44172 | LD HL,45146 | Print "SAVING. Start tape,press any key." and start a new line. | |
| 44175 | CALL PrintStringAndANewline | |||
| 44178 | CALL GetUserInput | Call GetUserInput to read the player's key. | ||
| 44181 | LD IX,44406 | Point IX at the item-location table. | ||
| 44185 | LD DE,390 | Save 390 bytes from the item-location table to tape as a data block. | ||
| 44188 | LD A,255 | |||
| 44190 | CALL 1218 | |||
| 44193 | LD HL,45180 | Print "Stop tape.Saving complete." and start a new line. | ||
| 44196 | CALL PrintStringAndANewline | |||
| 44199 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 44137 | Up: Map | Next: 44200 |