Back to Skool Routines
61555: Repeat command list or tell kids to sit down
Used by command lists 22, 24, 58, 60 and 62.
H Character number of teacher (201-204)
61555 LD A,(32740) 32740 holds the MSB of the lesson time counter (which starts at 16)
61558 CP 12 Is it time to tell the kids to sit down yet?
61560 JR C,61568 Jump if so
61562 LD L,29 Otherwise signal that the command list is to be restarted
61564 SET 0,(HL)
61566 JR 61591
61568 CALL 25213 Collect the next byte (event indicator for the start of the lesson) from the command list
61571 LD C,A C=event indicator (8, 9, 10, 11, 12)
61572 CALL 31887 Has this event already happened?
61575 JR NZ,61591 Jump if so
61577 LD A,C Otherwise signal that the event has certainly happened now
61578 CALL 31896
61581 LD A,H A=character number of the teacher
61582 SUB 109 E=92, 93, 94 or 95 (appropriate SIT DOWN message for this teacher)
61584 LD E,A
61585 LD BC,27144 Redirect control to the routine at 27144 (make character speak) and then return to 61591 (below)
61588 CALL 25503
61591 JP 25484 Move to the next instruction in the command list