| Routines

6F2C: 'O' pressed - left

The address of this routine is found in the table of keypress handling routines at E550. It is called from the main loop at F6EA when 'O' or '5' is pressed.
6F2C | LD A,($D200) | A=ERIC's animatory state
6F2F | BIT 7,A | Is ERIC facing right?
6F31 | JP NZ,$6E38 | Turn ERIC round if so
6F34 | CALL $6E50 | Is ERIC on a staircase?
6F37 | JR C,$6F3D | Jump if so
This entry point is used by the routines at 6F44 and 6FA0.
6F39 | DEC E | E=x-coordinate of the spot in front of ERIC
6F3A | JP $6E9B | Check for walls and closed doors in ERIC's path
ERIC is on a staircase.
6F3D | RLA | Does the staircase ERIC's on go down and to the left?
6F3E | JP C,$6FBE | Go down a stair if so
6F41 | JP $6F62 | Otherwise go up a stair