| Routines

F79A: Initialise a cat's interruptible subcommand

Used by the routine at F82A. Places the address of the interruptible subcommand routine at F846 into bytes 0x0E and 0x0F of the cat's buffer, and then jumps to it.
Input
BC | F846
H | 0xDA (Cat)
F79A | LD L,$0E | Copy the address of the interruptible subcommand routine at F846 into bytes 0x0E and 0x0F of the cat's buffer
F79C | LD (HL),C
F79D | INC L
F79E | LD (HL),B
F79F | LD A,H | Save the character number in A briefly
F7A0 | POP HL | Drop the return address from the stack
F7A1 | PUSH BC | Push the address of the interruptible subcommand routine onto the stack
F7A2 | LD C,L | Set BC to the original return address, and point HL at byte 0x08 of the cat's buffer
F7A3 | LD L,$08
F7A5 | LD B,H
F7A6 | LD H,A
This entry point is used by the routine at F7AB with an interruptible subcommand routine address in BC, and HL pointing at byte 0x0E of the character's buffer.
F7A7 | LD (HL),C | Set the address of the character's primary command routine or interruptible subcommand routine
F7A8 | INC L
F7A9 | LD (HL),B
F7AA | RET |