| Routines

6648: Check whether a character is on a staircase

Used by the routines at 6652, 66AA, 6CAF, 6E90, F499 and F650. Returns with the zero flag set if the character is not on a staircase.
Input
D | Character's y-coordinate
6648 | LD A,D | A=character's y-coordinate
This entry point is used by the routines at 69F6, 6D1C, 6F1E, 7000 and F9E5 with A holding the character's y-coordinate.
6649 | CP $9B | Is the character on the top floor?
664B | RET Z | Return with the zero flag set if so
664C | CP $A2 | Is the character on the middle floor?
664E | RET Z | Return with the zero flag set if so
664F | CP $A9 | Is the character on the top floor?
6651 | RET | Return with the zero flag set if so