![]() |
Routines |
| Prev: AC6D | Up: Map | Next: ACEA |
|
Used by the routine at Action_Load.
Read a save block back from tape into the configurable exits.
|
||||
| LoadFromTape | ACA8 | LD HL,$B01F | Print "LOADING. Start tape." and start a new line. | |
| ACAB | CALL PrintStringAndANewline | |||
| ACAE | LD IX,$AD76 | Load the starting address into IX at the item-location table. | ||
| ACB2 | LD DE,$0186 | Set the block length in DE to 0186 bytes. | ||
| ACB5 | LD A,$FF | Set A to FF which indicates this is a data block. | ||
| ACB7 | SCF | Set the carry flag to indicate this is loading. | ||
| ACB8 | CALL $0556 | Call LD_BYTES. | ||
| ACBB | JR C,LoadTape_Success | Branch to LoadTape_Success if the block loaded without error (carry flag set). | ||
| ACBD | LD HL,$B034 | Print "Tape error. Press any key to restart." and start a new line. | ||
| ACC0 | CALL PrintStringAndANewline | |||
| ACC3 | SCF | Set the carry flag to report that the load failed, so Action_Load restarts the game. | ||
| ACC4 | RET | Return. | ||
| LoadTape_Success | ACC5 | LD A,($AEFA) | Read the configurable-exit count into A. | |
| ACC8 | OR A | Return if A is zero. | ||
| ACC9 | RET Z | |||
|
B counts the exits, IX walks their addresses and DE the save buffer.
|
||||
| ACCA | LD B,A | Take the exit count and point at the exit table and the save buffer. | ||
| ACCB | LD IX,($AEE6) | |||
| ACCF | LD DE,$AE9B | |||
| ACD2 | JR LoadFromTape_0 | Restore the first configurable exit. | ||
| LoadTape_RestoreExit | ACD4 | INC IX | Copy each saved destination back into the configurable exits. | |
| ACD6 | INC IX | |||
| ACD8 | INC DE | |||
| LoadFromTape_0 | ACD9 | LD L,(IX+$00) | ||
| ACDC | LD H,(IX+$01) | |||
| ACDF | LD A,(DE) | |||
| ACE0 | LD (HL),A | |||
| ACE1 | DJNZ LoadTape_RestoreExit | |||
| ACE3 | LD E,$00 | Show the room picture only when it has not already been seen. | ||
| ACE5 | CALL HandlerDisplayRoomImage | |||
| ACE8 | AND A | Clear the carry flag to report that the load worked, so Action_Load goes back to the game. | ||
| ACE9 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: AC6D | Up: Map | Next: ACEA |