| Routines

6CF4: Check whether Sam is at the right place to pick up a telephone

Used by the routine at 749E. Returns with the zero flag reset if the x-coordinate of the front column of Sam's sprite is between 1 and 6 mod 8 (which is where telephones are located in rooms).
Input
H | 0xE6 (Sam)
6CF4 | CALL $F6A2 | Calculate the x-coordinate of the front column of Sam's sprite (x)
6CF7 | LD B,A | B=x%8
6CF8 | DEC A | Set the zero flag if x is 0 or 7 mod 8 (telephones are located at x-coordinates between 1 and 6 mod 8)
6CF9 | CP $06
6CFB | SBC A,A
6CFC | LD A,B | A=x%8
6CFD | LD B,$02 | Bit 1 set: check for the presence of a telephone
6CFF | RET |