Routines
 Prev: 7C6C Up: Map Next: 7C97
7C6E: Make a teacher perform dinner duty (1)
Used by command list 0xB8. Makes the teacher on dinner duty pace up and down the dinner hall, checking whether ERIC is present. If ERIC is absent, the teacher is sent to find him, after which the command list is restarted.
Input
H 0xA3 (MR WACKER) or 0xA5 (MR WITHIT)
7C6E LD DE,\$7FC8 Set bit 7 at 7FC8, indicating that dinner has started (and so ERIC should be in the dinner hall)
7C71 EX DE,HL
7C72 SET 7,(HL)
7C74 EX DE,HL
This entry point is used on subsequent calls when the teacher on dinner duty has reached the right end of the dinner hall.
7C75 CALL \$79D4 Set the zero flag if ERIC is where he should be
7C78 LD DE,\$9721 D=0x97 (LSB of 7C97), E=33 (x-coordinate of the left end of the teacher's dinner duty orbit)
This entry point is used by the routine at 7C97 with D=0x75 (LSB of the entry point at 7C75, above) and E=62 (x-coordinate of the right end of the teacher's dinner duty orbit), and also by the routine at F300 with the zero flag reset.
7C7B LD L,\$69
7C7D JR Z,\$7C87 Jump if ERIC is where he should be
7C7F LD (HL),\$A0 Place the address of the interruptible subcommand routine at 7BA0 into bytes 0x69 and 0x6A of the character's buffer
7C81 INC L
7C82 LD (HL),\$7B