Prev: $1445 Up: Map Next: $149F
$1468: Get the identifier and coordinates of the blackboard closest to a character
This corresponds to $7128 in the ZX Spectrum version.
Used by the routines at $0A58, $1129, $16E9, $184E, $19A5 and $1FA0. This routine also copies the blackboard's buffer into page 0.
Output
($DA) Blackboard identifier
($15,$16) Blackboard coordinates
$1468 JSR $1C8E Check which floor the character is on.
$146B CMP #$02 Is the character on the top floor?
$146D BNE $147C Branch if not.
$146F LDA #$2A Store the coordinates of the Reading Room blackboard at $15.
$1471 STA $15
$1473 LDA #$03
$1475 STA $16
$1477 LDY #$00 Y=0: Reading Room blackboard.
$1479 JMP $1499 Jump forward.
$147C LDA $FC Pick up the character's x-coordinate from $FC.
$147E CMP #$25 Is the character to the right of the Exam Room wall?
$1480 BCS $148F Branch if so.
$1482 LDA #$1A Store the coordinates of the White Room blackboard at $15.
$1484 STA $15
$1486 LDA #$09
$1488 STA $16
$148A LDY #$01 Y=1: White Room blackboard.
$148C JMP $1499 Jump forward.
$148F LDA #$29 Store the coordinates of the Exam Room blackboard at $15.
$1491 STA $15
$1493 LDA #$09
$1495 STA $16
$1497 LDY #$02 Y=2: Exam Room blackboard.
$1499 STY $DA Store the blackboard identifier at $DA.
$149B JSR $1421 Copy the blackboard's buffer into page 0.
$149E RTS
Prev: $1445 Up: Map Next: $149F