Prev: BB55 Up: Map Next: BB94
BB59: Save Game
Used by the routines at Action_Save and Action_Quit.
SaveGame BB59 LD A,($BD32) A=*Count_ConfigurableExits.
BB5C OR A Jump to SaveGame_2 if A is zero.
BB5D JR Z,SaveGame_2
BB5F LD B,A B=A.
BB60 LD IX,($BD22) IX=*BD22.
BB64 LD DE,$BC99 DE=BC99.
BB67 JR SaveGame_1 Jump to SaveGame_1.
SaveGame_0 BB69 INC IX Increment IX by two.
BB6B INC IX
BB6D INC DE Increment DE by one.
SaveGame_1 BB6E LD L,(IX+$00) L=*IX+00.
BB71 LD H,(IX+$01) H=*IX+01.
BB74 LD A,(HL) Write *HL to *DE.
BB75 LD (DE),A
BB76 DJNZ SaveGame_0 Decrease counter by one and loop back to SaveGame_0 until counter is zero.
Print "SAVING. Start tape,press any key.".
SaveGame_2 BB78 LD HL,$BE78 HL=Messaging_SavingStartTape.
BB7B CALL PrintStringAndNewline Call PrintStringAndNewline.
BB7E CALL GetUserInput Call GetUserInput.
BB81 LD IX,$BBF0 IX=BBF0.
BB85 LD DE,$0144 DE=0144.
BB88 LD A,$FF Set A to FF which indicates this is a data block.
BB8A CALL $04C2 Call SA_BYTES.
Print "Stop tape.Saving complete.".
BB8D LD HL,$BE9A HL=Messaging_StopTape.
BB90 CALL PrintStringAndNewline Call PrintStringAndNewline.
BB93 RET Return.
View the equivalent code in Warlord.
Prev: BB55 Up: Map Next: BB94