![]() |
Routines |
| BC | Routine address |
| H | Character number (183-214) |
| 25503 | LD L,9 | Copy the routine address from BC into bytes 9 and 10 of the character's buffer |
| 25505 | LD (HL),C | |
| 25506 | INC L | |
| 25507 | LD (HL),B | |
| 25508 | LD A,H | A=character number |
| 25509 | POP HL | Drop the return address from the stack into HL |
| 25510 | PUSH BC | Push the routine address in BC onto the stack |
| 25511 | LD C,L | |
| 25512 | LD L,3 |
| 25514 | LD B,H | Now BC=address of the instruction after CALL 25503/25525 |
| 25515 | LD H,A | H=character number |
| 25516 | LD (HL),C | Copy the address in BC (the return address to the caller of this routine) into bytes 3 and 4 (9 and 10) of the character's buffer |
| 25517 | INC L | |
| 25518 | LD (HL),B | |
| 25519 | RET | Make an indirect jump to the routine whose address was in BC on entering this routine |