Prev: F072 Up: Map Next: F09A
F073: Restart the command list or make a teacher tell the kids to sit down
Used by the teachers' command lists 0x16, 0x18, 0x3A, 0x3C and 0x3E. Restarts the teacher's command list if it's not time to start the class yet; otherwise makes the teacher tell the kids to sit down.
Input
H Teacher's character number (0xC9-0xCC)
F073 LD A,($7FE4) Collect the MSB of the lesson clock (which starts at 0x10)
F076 CP $0C Is it time to tell the kids to sit down yet?
F078 JR C,$F080 Jump if so
F07A LD L,$1D Otherwise signal that the command list is to be restarted
F07C SET 0,(HL)
F07E JR $F097
F080 CALL $627D Collect the event indicator for the start of the lesson (0x08, 0x09, 0x0A, 0x0B or 0x0C) from the command list
F083 LD C,A Save the event indicator in C briefly
F084 CALL $7C8F Has the lesson already started?
F087 JR NZ,$F097 Jump if so (the teacher must have just returned to the classroom doorway after hunting down the truant ERIC)
F089 LD A,C Restore the event indicator to A, and signal that the lesson has started
F08A CALL $7C98
F08D LD A,H A=teacher's character number
F08E SUB $6D E=0x5C, 0x5D, 0x5E or 0x5F (appropriate SIT DOWN message for this teacher)
F090 LD E,A
F091 LD BC,$6A08 Redirect control to the routine at 6A08 (make character speak) and then return to F097 (below)
F094 CALL $639F
F097 JP $638C Move to the next command in the command list
Prev: F072 Up: Map Next: F09A