Prev: 44141 Up: Map Next: 44266
44200: Load From Tape
Used by the routine at Action_Load.
Read a save block back from tape into the configurable exits.
LoadFromTape 44200 LD HL,45087 Print "LOADING. Start tape." and start a new line.
44203 CALL PrintStringAndANewline
44206 LD IX,44406 Load the starting address into IX at the item-location table.
44210 LD DE,390 Set the block length in DE to 390 bytes.
44213 LD A,255 Set A to 255 which indicates this is a data block.
44215 SCF Set the carry flag to indicate this is loading.
44216 CALL 1366 Call LD_BYTES.
44219 JR C,LoadTape_Success Branch to LoadTape_Success if the block loaded without error (carry flag set).
44221 LD HL,45108 Print "Tape error. Press any key to restart." and start a new line.
44224 CALL PrintStringAndANewline
44227 SCF Set the carry flag to report that the load failed, so Action_Load restarts the game.
44228 RET Return.
LoadTape_Success 44229 LD A,(44794) Read the configurable-exit count into A.
44232 OR A Return if A is zero.
44233 RET Z
B counts the exits, IX walks their addresses and DE the save buffer.
44234 LD B,A Take the exit count and point at the exit table and the save buffer.
44235 LD IX,(44774)
44239 LD DE,44699
44242 JR LoadFromTape_0 Restore the first configurable exit.
LoadTape_RestoreExit 44244 INC IX Copy each saved destination back into the configurable exits.
44246 INC IX
44248 INC DE
LoadFromTape_0 44249 LD L,(IX+0)
44252 LD H,(IX+1)
44255 LD A,(DE)
44256 LD (HL),A
44257 DJNZ LoadTape_RestoreExit
44259 LD E,0 Show the room picture only when it has not already been seen.
44261 CALL HandlerDisplayRoomImage
44264 AND A Clear the carry flag to report that the load worked, so Action_Load goes back to the game.
44265 RET Return.
Prev: 44141 Up: Map Next: 44266