Prev: 56418 Up: Map Next: 56857
56727: Handler: Keyboard
Used by the routine at Dispatch_Handlers.
In-game keypresses: save, load, pause, and the hidden room cheats when *65535 is 10.
Handler_Keyboard 56727 CALL 654 Call KEY_SCAN.
56730 LD A,E A=the keypress.
56731 CP 30 Jump to Tape_Save if "S" was pressed.
56733 JR Z,Tape_Save
56735 CP 25 Jump to Tape_Load if "J" was pressed.
56737 JR Z,Tape_Load
56739 CP 34 Jump to Wait_Keypress if "H" was pressed.
56741 JR Z,Wait_Keypress
56743 CP 16 Jump to Cheat_LoseLife if "Q" was pressed.
56745 JR Z,Cheat_LoseLife
56747 LD A,(65535) Return unless *65535 is 10.
56750 CP 10
56752 RET NZ Cap *Player_Lives at 3.
56753 LD A,(25780)
56756 CP 2
56758 JR C,Handler_Keyboard_Cheats
56760 LD A,3
56762 LD (25780),A
Handler_Keyboard_Cheats 56765 LD HL,15360 Write 15360 to *CHARS.
56768 LD (23606),HL
56771 LD A,E Jump to Cheat_NextRoom if "8" was pressed.
56772 CP 8
56774 JP Z,Cheat_NextRoom
56777 OR A Jump to Cheat_PreviousRoom if "1" was pressed.
56778 JP Z,Cheat_PreviousRoom
56781 CP 32 Write 1797 to *Player if "C" was pressed.
56783 JR NZ,Handler_Keyboard_Corner2
56785 LD HL,1797
56788 LD (25764),HL
Handler_Keyboard_Corner2 56791 CP 36 Write 5663 to *Player if "X" was pressed.
56793 JR NZ,Handler_Keyboard_Corner3
56795 LD HL,5663
56798 LD (25764),HL
Handler_Keyboard_Corner3 56801 CP 39 Write 1823 to *Player if "Z" was pressed.
56803 JR NZ,Handler_Keyboard_Corner4
56805 LD HL,1823
56808 LD (25764),HL
Handler_Keyboard_Corner4 56811 CP 35 Write 5637 to *Player if "V" was pressed.
56813 JR NZ,Handler_Keyboard_Lives
56815 LD HL,5637
56818 LD (25764),HL
Handler_Keyboard_Lives 56821 CP 22 Write 1 to *Player_Lives if "B" was pressed.
56823 JR NZ,Handler_Keyboard_RoomLetter
56825 LD A,1
56827 LD (25780),A
Handler_Keyboard_RoomLetter 56830 LD BC,801 Call JumpTable_SetPrintPosition at column 3 row 33.
56833 CALL JumpTable_SetPrintPosition
56836 LD A,7 Write WHITE to *ATTR_T.
56838 LD (23695),A
56841 LD A,(25762) Print *CurrentRoom as "A"+"room".
56844 ADD A,65
56846 JP JumpTable_PrintCharacter
56849 RET Return.
Print C as an ASCII digit.
Print_Digit 56850 LD A,C Convert the digit into ASCII.
56851 ADD A,48
56853 CALL JumpTable_PrintCharacter Call JumpTable_PrintCharacter.
56856 RET Return.
Prev: 56418 Up: Map Next: 56857