Prev: A5C6 Up: Map Next: A605
A5CA: Save Game
Used by the routines at Action_Save and Action_Quit.
SaveGame A5CA LD A,($A7F0) A=*Count_ConfigurableExits.
A5CD OR A Jump to SaveGame_2 if A is zero.
A5CE JR Z,SaveGame_2
A5D0 LD B,A B=A.
A5D1 LD IX,($A7DC) IX=*A7DC.
A5D5 LD DE,$A791 DE=A791.
A5D8 JR SaveGame_1 Jump to SaveGame_1.
SaveGame_0 A5DA INC IX Increment IX by two.
A5DC INC IX
A5DE INC DE Increment DE by one.
SaveGame_1 A5DF LD L,(IX+$00) L=*IX+00.
A5E2 LD H,(IX+$01) H=*IX+01.
A5E5 LD A,(HL) Write *HL to *DE.
A5E6 LD (DE),A
A5E7 DJNZ SaveGame_0 Decrease counter by one and loop back to SaveGame_0 until counter is zero.
Print "SAVING. Position tape. Press REC & PLAY,then any key.".
SaveGame_2 A5E9 LD HL,$A950 HL=Messaging_Saving.
A5EC CALL PrintStringAndNewline Call PrintStringAndNewline.
A5EF CALL GetUserInput Call GetUserInput.
A5F2 LD IX,$A66C IX=A66C.
A5F6 LD DE,$0186 DE=0186.
A5F9 LD A,$FF Set A to FF which indicates this is a data block.
A5FB CALL $04C2 Call SA_BYTES.
Print "Stop tape.Saving complete.".
A5FE LD HL,$A986 HL=Messaging_StopTapeSavingComplete.
A601 CALL PrintStringAndNewline Call PrintStringAndNewline.
A604 RET Return.
View the equivalent code in The Jewels Of Babylon.
Prev: A5C6 Up: Map Next: A605