Prev: 7DA7 Up: Map Next: 7DD4
7DB2: Make a teacher conduct a class
Used by the teachers' command lists 0x80, 0x82, 0x84 and 0x86. Determines whether the teacher is conducting ERIC's class, and hands over to F300 if so or 7D30 if not.
Input
H Teacher's character number (0xA3-0xA6)
7DB2 LD A,($7FF4) Pick up the lesson descriptor from 7FF4
7DB5 AND $F0 Keep only the 'teacher' bits (4-7)
7DB7 RLCA A=character number of the teacher (0xA3-0xA6) who is teaching ERIC and EINSTEIN this period
7DB8 RLCA
7DB9 RLCA
7DBA RLCA
7DBB ADD A,$A3
7DBD CP H Set the zero flag if this teacher is teaching ERIC
7DBE LD L,$63
7DC0 JR Z,$7DC7 Jump if we're dealing with ERIC's teacher
7DC2 LD (HL),$30 Replace the address of this routine in bytes 0x63 and 0x64 of the teacher's buffer with 7D30, and jump there now to start the lesson
7DC4 JP $7D30
This teacher has the pleasure of conducting ERIC's class this period.
7DC7 LD (HL),$00 Replace the address of this routine in bytes 0x63 and 0x64 of the teacher's buffer with that of F300
7DC9 INC L
7DCA LD (HL),$F3
7DCC LD A,$00 Clear all the lesson status flags at 7FC8
7DCE LD ($7FC8),A
7DD1 JP $F300 Start the lesson
Prev: 7DA7 Up: Map Next: 7DD4