Prev: $350A Up: Map Next: $3558
$350B: 'Q' pressed - up
This corresponds to $65E4 in the ZX Spectrum version.
Used by the routines at $0800, $3558 and $359E.
$350B LDA $26 Pick up ERIC's animatory state from $26.
$350D AND #$04 Is bit 2 set, indicating that ERIC is sitting or lying down?
$350F BNE $3557 Return if so.
$3511 JSR $1C8E Is ERIC on a staircase?
$3514 BCC $352C Branch if not.
$3516 LDA $FC Pick up ERIC's x-coordinate from $FC.
$3518 CMP #$30 Is ERIC on a staircase on the right side of the skool?
$351A BCS $3524 Branch if so.
$351C LDA $26 Pick up ERIC's animatory state from $26.
$351E ASL A Is ERIC facing left?
$351F BCC $3549 Branch if so.
$3521 JMP $364E Otherwise turn ERIC round to make him face left.
$3524 LDA $26 Pick up ERIC's animatory state from $26.
$3526 ASL A Is ERIC facing right?
$3527 BCS $3549 Branch if so.
$3529 JMP $364E Otherwise turn ERIC round to make him face right.
$352C LDA $FB Pick up ERIC's y-coordinate from $FB.
$352E CMP #$03 Is ERIC on the top floor?
$3530 BEQ $3554 Branch if so.
$3532 LDA $26 Pick up ERIC's animatory state from $26.
$3534 ASL A Is ERIC facing right?
$3535 BCS $3540 Branch if so.
$3537 LDA $FC Pick up ERIC's x-coordinate from $FC.
$3539 CMP #$13 Is ERIC at the bottom of a staircase on the left side of the skool?
$353B BEQ $3549 Branch if so.
$353D JMP $3558 Otherwise move ERIC left.
$3540 LDA $FC Pick up ERIC's x-coordinate from $FC.
$3542 CMP #$46 Is ERIC at the bottom of a staircase on the right side of the skool?
$3544 BEQ $3549 Branch if so.
$3546 JMP $359E Otherwise move ERIC right.
$3549 LDA #$00 Store 0 at $11. This is ERIC's post-midstride y-coordinate increment.
$354B STA $11
$354D LDA #$FF Store -1 at $10. This is ERIC's midstride y-coordinate increment for his next movement: up one step.
$354F STA $10
$3551 JMP $365C Move ERIC midstride.
$3554 JMP $34FE Move ERIC forward in the direction he's facing.
$3557 RTS
Prev: $350A Up: Map Next: $3558