| Routines

61487: Make a teacher give lines to EINSTEIN or the kid he grassed up

Used by the routine at 61696. Makes a teacher give lines to EINSTEIN (for telling tales) 84 times out of 256, or give lines to the kid EINSTEIN grassed up (if any) the rest of the time.
Input
B | Reprimand message number
C | Character number of the kid to give lines to (206, 208 or 210)
H | Teacher's character number (201-203)
61487 | CALL 25233 | A=random number
61490 | CP 84 | Shall we give lines to EINSTEIN for telling tales?
61492 | JR C,61500 | Jump if so
61494 | LD A,C | A=character number of the kid to give lines to
61495 | CP 208 | Was EINSTEIN telling the teacher that ERIC is not in class?
61497 | RET Z | Return if so (there is no scapegoat to give lines to)
61498 | JR 61504 |
61500 | LD A,208 | 208=EINSTEIN
61502 | LD B,85 | Message 85: DON'T TELL TALES
This entry point also is used by the routine at 61696.
61504 | PUSH HL |
61505 | CALL 29716 | Give lines to EINSTEIN or the kid he grassed up
61508 | POP HL |
61509 | RET |