Prev: F017 Up: Map Next: F046
F02F: Make a teacher give lines to EINSTEIN or the kid he grassed up
Used by the routine at F100. 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 (0xCE, 0xD0 or 0xD2)
H Teacher's character number (0xC9-0xCB)
F02F CALL $6291 A=random number
F032 CP $54 Shall we give lines to EINSTEIN for telling tales?
F034 JR C,$F03C Jump if so
F036 LD A,C A=character number of the kid to give lines to
F037 CP $D0 Was EINSTEIN telling the teacher that ERIC is not in class?
F039 RET Z Return if so (there is no scapegoat to give lines to)
F03A JR $F040
F03C LD A,$D0 0xD0=EINSTEIN
F03E LD B,$55 Message 0x55: DON'T TELL TALES
This entry point also is used by the routine at F100.
F040 PUSH HL
F041 CALL $7414 Give lines to EINSTEIN or the kid he grassed up
F044 POP HL
F045 RET
Prev: F017 Up: Map Next: F046