![]() |
Routines |
H | Character number of teacher (163-166) |
32048 | CALL 28968 | A=identifier of blackboard teacher is next to |
32051 | LD C,A | Copy this to C |
32052 | CP 236 | Is the teacher next to the Reading Room blackboard? |
32054 | JR NZ,32062 | Jump if not |
32056 | INC L | L=98 |
32057 | LD A,(HL) | A=teacher's x-coordinate |
32058 | CP 58 | Is the teacher in the Map Room? |
32060 | JR NC,32112 | Jump if so (there's no blackboard in the Map Room) |
32062 | LD BC,29148 | Hand over control to the routine at 29148, making the wipe the blackboard |
32065 | CALL 31985 |
32068 | LD L,98 | A=teacher's x-coordinate (equal to that of the left edge of the blackboard) |
32070 | LD A,(HL) | |
32071 | ADD A,3 | Place the x-coordinate of the middle of the blackboard in byte 107 of the teacher's buffer, and the same value in byte 108 (which ensures that the routine at 25404 will not relinquish control before the teacher has reached the middle of the blackboard) |
32073 | LD L,107 | |
32075 | LD (HL),A | |
32076 | INC L | |
32077 | LD (HL),A | |
32078 | LD BC,25404 | Hand over control to the routine at 25404, making the teacher walk to the middle of the blackboard |
32081 | CALL 31985 |
32084 | CALL 24993 | Get random number in A |
32087 | CP 160 | Should the teacher write on the blackboard? |
32089 | JR C,32112 | Jump if not |
32091 | LD BC,29284 | Hand over control to the routine at 29284, making the teacher write on the blackboard |
32094 | CALL 31985 |
32097 | CALL 24993 | Get random number in A |
32100 | CP 160 | Should the teacher tell the kids to write an essay? |
32102 | JR C,32112 | Jump if not |
32104 | LD BC,62166 | 62166='WRITE AN ESSAY WITH THIS TITLE' |
32107 | CALL 32038 | Make teacher tell kids to write an essay |
32110 | JR 32115 | |
32112 | CALL 31996 | Make teacher tell kids to go to a page in their books |
32115 | LD L,98 | A=teacher's x-coordinate |
32117 | LD A,(HL) | |
32118 | XOR 3 | Store the x-coordinate of the location 3 spaces behind the teacher in byte 107 of his buffer |
32120 | LD L,107 | |
32122 | LD (HL),A | |
32123 | LD BC,25404 | Hand over control to the routine at 25404, making the teacher turn round and walk 3 paces |
32126 | CALL 31985 | |
32129 | JR 32115 | Make teacher turn round and walk 3 paces again |