Prev: 61882 Up: Map Next: 61948
61923: Check for keypresses when Sam is on the phone
Used by the routines at 30575 and 30675. Returns with the zero flag set if no key with an ASCII code in the range 48-127 has been pressed. Otherwise returns with the ASCII code of the last keypress (converted to lower case) in A, or hangs up if 'h' was pressed.
61923 LD HL,58888 Reset Sam's main action timer (in byte 8 of his buffer) to 4
61926 LD (HL),4
61928 CALL 60121 Collect the ASCII code of the last key pressed in A
61931 RET Z Return if no key with an ASCII code in the range 48-127 was pressed
61932 SET 5,A Convert the ASCII code to lower case
61934 CP 104 Was 'h' (hang up) pressed?
61936 RET NZ Return if not
61937 POP BC Drop the return address from the stack
61938 XOR A A=0
61939 LD (32764),A Clear all of Sam's status flags at 32764
61942 LD (32666),A Clear the ID of the phone that Sam is calling at 32666
61945 JP 30506 Make a sound effect
Prev: 61882 Up: Map Next: 61948