![]() |
Routines |
| H | Character number of teacher (201-204) |
| 61533 | CALL 25233 | A=random number |
| 61536 | CP 240 | Set the carry flag if A<240, and set the zero flag if A<128 |
| 61538 | BIT 7,A | |
| 61540 | LD E,91 | |
| 61542 | JR NC,61548 | Jump if it's essay time (A>=240) |
| 61544 | JR Z,61547 | Jump if it's book-reading time (A<128) |
| 61546 | DEC E | It's revision time (128<=A<240) |
| 61547 | DEC E |
| E | Message | 89 | START REVISING FOR YOUR EXAMS | 90 | START READING AT THE NEXT CHAPTER IN YOUR BOOKS | 91 | WRITE AN ESSAY TITLED 'WHY I LOVE SCHOOL' |
|---|
| 61548 | LD BC,27144 | Redirect control to the routine at 27144 (make character speak), then return control to the calling routine |
| 61551 | JP 25503 |