Routines

61631: Make teacher find ERIC during dinner if necessary


Used by table of A&P number 30

H 200 (MR WACKER) or 201 (MR WITHIT)

61631 11E47F LD DE,32740
61634 1A LD A,(DE) A=MSB of lesson time counter (starts off at 16)
61635 FE0C CP 12 Is ERIC supposed to be in the dinner hall by now?
61637 300F JR NC,61654 Jump if not
61639 1E80 LD E,128
61641 EB EX DE,HL HL=32640
61642 CBF6 SET 6,(HL) Signal: ERIC should be in the dinner hall
61644 EB EX DE,HL
61645 CD157D CALL 32021 Is ERIC in the dinner hall?

This entry point is used by the routines at 61696 and 61658:
61648 019BF0 LD BC,61595 Redirect control to the routine at 61595 (find ERIC) if ERIC is not where he should be, then return to 61654
61651 C49F63 CALL NZ,25503
61654 C38C63 JP 25484 Move to the next instruction in the table of A&P