![]() |
Routines |
| Prev: 42438 | Up: Map | Next: 42501 |
|
Used by the routines at Action_Save and Action_Quit.
|
||||
| SaveGame | 42442 | LD A,(42992) | Read the configurable-exit count into A. | |
| 42445 | OR A | Jump to SaveGame_PrintSaving if there are no configurable exits to pack. | ||
| 42446 | JR Z,SaveGame_PrintSaving | |||
| 42448 | LD B,A | Copy the configurable-exit count into B. | ||
| 42449 | LD IX,(42972) | IX=*42972. | ||
| 42453 | LD DE,42897 | DE=Buffer_LoadSave. | ||
| 42456 | JR SaveGame_StoreFlag | Jump to SaveGame_StoreFlag. | ||
|
Move on to the next configurable-exit address.
|
||||
| SaveGame_Copy | 42458 | INC IX | Move IX on to the next exit address. | |
| 42460 | INC IX | |||
| 42462 | INC DE | Move DE on to the next packed exit byte. | ||
| SaveGame_StoreFlag | 42463 | LD L,(IX+0) | Fetch the exit address from *IX into HL. | |
| 42466 | LD H,(IX+1) | |||
| 42469 | LD A,(HL) | Copy the exit byte into the packed save buffer. | ||
| 42470 | LD (DE),A | |||
| 42471 | DJNZ SaveGame_Copy | Decrease the pack counter and loop back to SaveGame_Copy until every exit byte is packed. | ||
|
Print "SAVING. Position tape.
Press REC & PLAY,then any key.".
|
||||
| SaveGame_PrintSaving | 42473 | LD HL,43344 | HL=Messaging_Saving. | |
| 42476 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
| 42479 | CALL GetUserInput | Call GetUserInput. | ||
| 42482 | LD IX,42604 | Load the starting address into IX at Table_ItemEventLocations. | ||
| 42486 | LD DE,390 | Set the block length in DE to 390 bytes. | ||
| 42489 | LD A,255 | Set A to 255 which indicates this is a data block. | ||
| 42491 | CALL 1218 | Call SA_BYTES. | ||
|
Print "Stop tape.Saving complete.".
|
||||
| 42494 | LD HL,43398 | HL=Messaging_StopTapeSavingComplete. | ||
| 42497 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
| 42500 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 42438 | Up: Map | Next: 42501 |