![]() |
Routines |
BC | Message address |
H | Character number of teacher (163-166) |
31919 | LD DE,43371 | Point HL at byte 107 of EINSTEIN's buffer |
31922 | EX DE,HL | |
31923 | LD (HL),C | Copy the message address in BC to bytes 107 and 108 of EINSTEIN's buffer |
31924 | INC L | |
31925 | LD (HL),B |
31926 | LD HL,32713 | Signal that it's EINSTEIN's turn to speak |
31929 | SET 7,(HL) | |
31931 | EX DE,HL | |
31932 | LD L,106 | Place the address of the routine at 31944 in bytes 105 and 106 of the teacher's buffer |
31934 | LD (HL),124 | |
31936 | DEC L | |
31937 | LD (HL),200 | |
31939 | POP DE | Collect the return address in DE and copy it to bytes 99 and 100 of the teacher's buffer (so that control will resume there when 31944 relinquishes it) |
31940 | LD L,99 | |
31942 | LD (HL),E | |
31943 | RET | Return to the main loop |