Prev: 61510 Up: Map Next: 61533
61512: Check whether ERIC and EINSTEIN are in class
Used by the routine at 61696. If EINSTEIN is in class, this routine returns to the caller with the zero flag set if and only if ERIC is present too. If EINSTEIN is not yet sitting down in class, it makes the teacher wait until he shows up.
Input
H Teacher's character number (201-203)
61512 LD A,(53248) Pick up EINSTEIN's current animatory state in A
61515 CP 52 52: Is EINSTEIN sitting down (i.e. in class)?
61517 JP Z,32021 Check on ERIC if so
61520 LD DE,65533 DE=-3
61523 POP BC Drop the return address from the stack into BC
61524 EX DE,HL Set DE to the address of the CALL 61512 instruction in the calling routine
61525 ADD HL,BC
61526 EX DE,HL
61527 LD L,3 Place this address into bytes 3 and 4 of the teacher's buffer, so that we keep returning here (and the teacher stands still) until EINSTEIN arrives in class
61529 LD (HL),E
61530 INC L
61531 LD (HL),D
61532 RET Return to the character-moving routine at 25296
Prev: 61510 Up: Map Next: 61533