Routines
 Prev: 76F9 Up: Map Next: 772F
76FA: 'T' pressed - telephone
The address of this routine is found in the table of keypress handling routines at ED00. It is called from the main loop at F02B when 'T' is pressed.
Input
H 0xE6 (Sam)
76FA CALL \$749E Is Sam standing next to a telephone?
76FD RET Z Return if not
76FE LD HL,\$7F92 The buffer at 7F92 will hold the digits dialled by Sam
7701 LD BC,\$0500 B=5, C=0
7704 LD (HL),C Initialise the digit buffer at 7F92 by filling it with zeroes
7705 INC L
7706 DJNZ \$7704
7708 LD L,\$9B HL=7F9B (telephone call status flags)
770A CCF A=0x80 if the phone is ringing, 0x00 otherwise
770B SBC A,A
770C AND \$80
770E LD (HL),A Set bit 7 at 7F9B if Sam has picked up a ringing telephone
770F LD L,\$FC HL=7FFC (Sam's status flags)
7711 LD (HL),\$10 Set bit 4: Sam is on the phone
7713 LD L,\$D3 Store the phone's identifier at 7FD3
7715 LD (HL),E
7716 JR NZ,\$771F Jump if the phone is ringing
7718 LD A,\$02 Subtract \$2 from Sam's cash supply
771A CALL \$6E8C
771D JR \$7725
Sam has picked up a telephone that is ringing.
771F LD A,(\$5C79) Collect the second byte of the FRAMES system variable, which is incremented every 5.12s
7722 LD L,\$99 Copy this byte to 7F99
7724 LD (HL),A
7725 LD A,\$29 Message 0x29: 'I LIFTED THE PHONE '
This entry point is used by the unused routine at 7A34 with A=0x27: 'I HUNG UP'.
7727 CALL \$75CA Queue the message urgently
This entry point is used by the routine at F1E3.
772A LD H,\$E6 0xE6=Sam
772C JP \$ECEE Make a sound effect
 Prev: 76F9 Up: Map Next: 772F