Prev: $13D5 Up: Map Next: $1421
$13F3: Guide a character up or down a staircase
The address of this interruptible subcommand routine appears in the staircase endpoint data tables at $4440 and $4454.
$13F3 LDA #$00 Store the direction indicator (zero, down) at $47.
$13F5 STA $47
$13F7 JMP $13FE Jump forward.
The address of this entry point appears in the staircase endpoint data tables at $4440 and $4454.
$13FA LDA #$FF Store the direction indicator (non-zero, up) at $47.
$13FC STA $47
$13FE DEC $AC Decrement the movement counter at $AC.
$1400 BNE $1405 Branch unless the character has reached the top or bottom of the staircase.
$1402 JMP $1D28 Terminate this interruptible subcommand routine.
$1405 JSR $322E Update the SRB for the character's current animatory state and location.
$1408 LDA $26 Pick up the character's animatory state from $26.
$140A LSR A Is the character midstride?
$140B BCC $1410 Branch if not.
$140D JMP $1398 Move the character from the midstride position.
$1410 INC $26 Increment the character's animatory state.
$1412 LDA $47 Pick up the direction indicator from $47.
$1414 BEQ $141B Branch if the character is going down the stairs.
$1416 DEC $FB Decrement the character's y-coordinate.
$1418 JMP $141D Jump forward.
$141B INC $FB Increment the character's y-coordinate.
$141D JSR $322E Update the SRB for the character's new animatory state and location.
$1420 RTS
Prev: $13D5 Up: Map Next: $1421