Prev: $253E Up: Map Next: $2573
$2552: Make a teacher give lines to EINSTEIN or the boy he's telling tales on
Used by the routines at $0A58 and $0B3B.
Input
A Character number of EINSTEIN or the boy that he's telling tales on
Y Lines reprimand identifier for the boy that EINSTEIN is telling tales on
$2552 PHA Save the character number on the stack and at $72.
$2553 STA $72
$2555 LDA $D41B Generate a random value in A.
$2558 CMP #$B5 Is this random value $B5 or greater?
$255A BCS $2566 Branch if so.
$255C PLA Retrieve the character number from the stack.
$255D CMP #$11 Is it $11 (EINSTEIN)?
$255F BEQ $2572 Return if so.
$2561 STY $D8 Store the lines reprimand identifier at $D8.
$2563 JMP $1DB7 Make the teacher give lines to the boy that EINSTEIN is telling tales on.
$2566 PLA Retrieve the character number from the stack.
$2567 LDA #$09 Lines reprimand $09: DON'T TELL TALES.
$2569 STA $D8 Store this lines reprimand identifier at $D8.
$256B LDA #$11 Character number $11 is EINSTEIN.
$256D STA $72 Store this character number at $72.
$256F JMP $1DB7 Make the teacher give lines to EINSTEIN.
$2572 RTS
Prev: $253E Up: Map Next: $2573