Prev: A5CA Up: Map Next: A647
A605: Load From Tape
Used by the routine at F892.
Print "LOADING. Press PLAY.".
LoadTape A605 LD HL,$A915 HL=Messaging_LoadingPressPlay.
A608 CALL PrintStringAndNewline Call PrintStringAndNewline.
A60B LD IX,$A66C Load the starting address into IX at Table_ItemLocations.
A60F LD DE,$0186 Set the block length in DE to 0186 bytes.
A612 LD A,$FF Set A to FF which indicates this is a data block.
A614 SCF Set the carry flag to indicate this is loading.
A615 CALL $0556 Call LD_BYTES.
A618 JR C,LoadTape_Success Jump to LoadTape_Success if the carry flag is not set.
Print "Tape error. Press any key to restart.".
A61A LD HL,$A92A HL=Messaging_TapeError.
A61D CALL PrintStringAndNewline Call PrintStringAndNewline.
A620 SCF
A621 RET Return.
LoadTape_Success A622 LD A,($A7F0) A=*Count_ConfigurableExits.
A625 OR A Return if A is zero.
A626 RET Z
A627 LD B,A B=A.
A628 LD IX,($A7DC) IX=*Pointer_ConfigurableExits.
A62C LD DE,$A791 DE=A791.
A62F JR LoadTape_Write Jump to LoadTape_Write.
LoadTape_WriteLoop A631 INC IX Increment IX by two.
A633 INC IX
A635 INC DE Increment DE by one.
LoadTape_Write A636 LD L,(IX+$00) L=*IX+00.
A639 LD H,(IX+$01) H=*IX+01.
A63C LD A,(DE) A=*DE.
A63D LD (HL),A Write A to *HL.
A63E DJNZ LoadTape_WriteLoop Decrease counter by one and loop back to LoadTape_WriteLoop until counter is zero.
A640 LD E,$00 E=00.
A642 CALL Handler_DisplayRoomImage Call Handler_DisplayRoomImage.
A645 AND A Set flags.
A646 RET Return.
View the equivalent code in The Jewels Of Babylon.
Prev: A5CA Up: Map Next: A647