| Routines

61631: Make a teacher find ERIC if he's absent during dinner

Used by command list 30. Makes the teacher run after and stalk ERIC until he goes to the dinner hall.
Input
H | 200 (MR WACKER) or 201 (MR WITHIT)
61631 | LD DE,32740 | Point DE at the MSB of the lesson clock (which starts off at 16)
61634 | LD A,(DE) | Pick this up in A
61635 | CP 12 | Is ERIC supposed to be in the dinner hall by now?
61637 | JR NC,61654 | Jump if not
61639 | LD E,128 | Set bit 6 at 32640, indicating that ERIC should be in the dinner hall now
61641 | EX DE,HL
61642 | SET 6,(HL)
61644 | EX DE,HL
61645 | CALL 32021 | Reset the zero flag if ERIC is not in the dinner hall
This entry point is used by the routines at 61696 and 61658.
61648 | LD BC,61595 | Redirect control to the routine at 61595 (find ERIC) if ERIC is not where he should be, then return to 61654 (below)
61651 | CALL NZ,25503
61654 | JP 25484 | Move to the next command in the command list