Skool Daze Routines
32178: Make teacher conduct class
Used in the teachers' command lists 128, 130, 132 and 134.
H Character number of teacher (163-166)
32178 LD A,(32756) A=lesson descriptor
32181 AND 240 Keep only the "teacher" bits (4-7)
32183 RLCA A=character number of teacher (163-166) that is teaching ERIC and EINSTEIN this period
32184 RLCA
32185 RLCA
32186 RLCA
32187 ADD A,163
32189 CP H Set the zero flag if this teacher is teaching ERIC
32190 LD L,99
32192 JR Z,32199 Jump if this teacher is teaching ERIC
32194 LD (HL),48 Replace the address of this routine in bytes 99 and 100 of the teacher's buffer with that of 32048, and jump there now to start the lesson
32196 JP 32048
This teacher has the pleasure of conducting ERIC's class this period.
32199 LD (HL),0 Replace the address of this routine in bytes 99 and 100 of the character's buffer with that of 62208
32201 INC L
32202 LD (HL),243
32204 LD A,0 Clear all the flags at 32712
32206 LD (32712),A
32209 JP 62208 Start the lesson