Prev: 40547 Up: Map Next: 40645
40576: Save Game
Used by the routines at 43924 and 43965.
SaveGame 40576 PUSH IX Stash IX, HL, DE and BC on the stack.
40578 PUSH HL
40579 PUSH DE
40580 PUSH BC
40581 LD A,(48081) A=*48081.
40584 OR A Set the bits from A.
40585 JR Z,SaveGame_2 Jump to SaveGame_2 if ?? is equal to A.
40587 LD B,A B=A.
40588 LD IX,47865 IX=47865.
40592 LD DE,41172 DE=41172.
40595 JR SaveGame_1 Jump to SaveGame_1.
SaveGame_0 40597 INC IX Increment IX by two.
40599 INC IX
40601 INC DE Increment DE by one.
SaveGame_1 40602 LD L,(IX+0) L=*IX+0.
40605 LD H,(IX+1) H=*IX+1.
40608 LD A,(HL) A=*HL.
40609 LD (DE),A Write A to *DE.
40610 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 40612 LD HL,40499 HL=Messaging_Saving.
40615 CALL PrintStringAndNewline Call PrintStringAndNewline.
40618 CALL GetUserInput Call GetUserInput.
40621 LD IX,40840 IX=Table_ItemLocations.
40625 LD DE,385 DE=385.
40628 LD A,255 A=255.
40630 CALL 1218 Call SA_BYTES.
40633 LD HL,40547 HL=Messaging_StopTapeSavingComplete.
40636 CALL PrintStringAndNewline Call PrintStringAndNewline.
40639 POP BC Restore BC, DE, HL and IX from the stack.
40640 POP DE
40641 POP HL
40642 POP IX
40644 RET Return.
Prev: 40547 Up: Map Next: 40645