| Routines

79BA: Control EINSTEIN during class (1)

Used by command lists 0x90, 0x98, 0xA0 and 0xA8. Makes EINSTEIN wait for his turn to speak, and then hands over control to the interruptible subcommand routine at 798C; when EINSTEIN has finished speaking, control returns to the primary command routine at 79CA.
Input
H | 0xA9 (EINSTEIN)
79BA | LD A,($7FC9) | Pick up the lesson signal flags from 7FC9
79BD | RLCA | Is it EINSTEIN's turn to speak yet?
79BE | RET NC | Return if not
79BF | LD L,$63 | Replace the address of this primary command routine in bytes 0x63 and 0x64 of EINSTEIN's buffer with that of 79CA (so that we go there after EINSTEIN has finished speaking)
79C1 | LD (HL),$CA
79C3 | LD L,$6A | Set the routine address MSB in byte 0x6A of EINSTEIN's buffer to that of 798C; the LSB will be set later
79C5 | LD (HL),$79
79C7 | JP $7986 | Make EINSTEIN join the queue to speak