Prev: 9E63 Up: Map Next: 9EC5
9E80: Save Game
Used by the routines at AB94 and ABBD.
SaveGame 9E80 PUSH IX Stash IX, HL, DE and BC on the stack.
9E82 PUSH HL
9E83 PUSH DE
9E84 PUSH BC
9E85 LD A,($BBD1) A=*BBD1.
9E88 OR A Set the bits from A.
9E89 JR Z,SaveGame_2 Jump to SaveGame_2 if ?? is equal to A.
9E8B LD B,A B=A.
9E8C LD IX,$BAF9 IX=BAF9.
9E90 LD DE,$A0D4 DE=A0D4.
9E93 JR SaveGame_1 Jump to SaveGame_1.
SaveGame_0 9E95 INC IX Increment IX by two.
9E97 INC IX
9E99 INC DE Increment DE by one.
SaveGame_1 9E9A LD L,(IX+$00) L=*IX+00.
9E9D LD H,(IX+$01) H=*IX+01.
9EA0 LD A,(HL) A=*HL.
9EA1 LD (DE),A Write A to *DE.
9EA2 DJNZ SaveGame_0 Decrease counter by one and loop back to SaveGame_0 until counter is zero.
Print "Press REC & PLAY on tape... Then press any key.".
SaveGame_2 9EA4 LD HL,$9E33 HL=Messaging_Saving.
9EA7 CALL PrintStringAndNewline Call PrintStringAndNewline.
9EAA CALL GetUserInput Call GetUserInput.
9EAD LD IX,$9F88 IX=Table_ItemLocations.
9EB1 LD DE,$0181 DE=0181.
9EB4 LD A,$FF A=FF.
9EB6 CALL $04C2 Call SA_BYTES.
9EB9 LD HL,$9E63 HL=Messaging_StopTapeSavingComplete.
9EBC CALL PrintStringAndNewline Call PrintStringAndNewline.
9EBF POP BC Restore BC, DE, HL and IX from the stack.
9EC0 POP DE
9EC1 POP HL
9EC2 POP IX
9EC4 RET Return.
Prev: 9E63 Up: Map Next: 9EC5