Prev: 47957 Up: Map Next: 48020
47961: Save Game
Used by the routines at Action_Save and Action_Quit.
SaveGame 47961 LD A,(48434) A=*Count_ConfigurableExits.
47964 OR A Jump to SaveGame_2 if A is zero.
47965 JR Z,SaveGame_2
47967 LD B,A B=A.
47968 LD IX,(48418) IX=*48418.
47972 LD DE,48281 DE=48281.
47975 JR SaveGame_1 Jump to SaveGame_1.
SaveGame_0 47977 INC IX Increment IX by two.
47979 INC IX
47981 INC DE Increment DE by one.
SaveGame_1 47982 LD L,(IX+0) L=*IX+0.
47985 LD H,(IX+1) H=*IX+1.
47988 LD A,(HL) Write *HL to *DE.
47989 LD (DE),A
47990 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 47992 LD HL,48760 HL=Messaging_SavingStartTape.
47995 CALL PrintStringAndNewline Call PrintStringAndNewline.
47998 CALL GetUserInput Call GetUserInput.
48001 LD IX,48112 IX=48112.
48005 LD DE,324 DE=324.
48008 LD A,255 Set A to 255 which indicates this is a data block.
48010 CALL 1218 Call SA_BYTES.
Print "Stop tape.Saving complete.".
48013 LD HL,48794 HL=Messaging_StopTape.
48016 CALL PrintStringAndNewline Call PrintStringAndNewline.
48019 RET Return.
View the equivalent code in Warlord.
Prev: 47957 Up: Map Next: 48020