Skool Daze Routines
31952: Make teacher wait for EINSTEIN to sit down or check that ERIC is present
Used by the routine at 62208 and 62464. Makes the teacher wait for EINSTEIN to sit down. If EINSTEIN is already sitting, checks whether ERIC is present, and returns with the zero flag set if and only if he is.
H Character number of teacher (163-166)
31952 LD A,(43360) A=EINSTEIN's animatory state
31955 CP 21 21=EINSTEIN sitting in a chair
31957 JP Z,31188 Jump if EINSTEIN is sitting in a chair
31960 POP DE Place the address of the instruction that called this routine into bytes 99 and 100 of the teacher's buffer, so that control of the teacher returns to this routine until EINSTEIN is seated
31961 LD L,99
31963 LD A,E
31964 SUB 3
31966 LD (HL),A
31967 RET