| Routines

F9ED: Initialise an uninterruptible subcommand if possible

Used by the routines at FAA2 and FB52. Places the address of an uninterruptible subcommand routine into bytes 0x12 and 0x13 of a character's buffer if there's not one there already, and returns with the zero flag set in that case.
Input
A | Character number (0xD7-0xE5)
BC | Uninterruptible subcommand routine address
F9ED | PUSH HL |
F9EE | LD H,A | Point HL at byte 0x13 of the character's buffer
F9EF | LD L,$13
F9F1 | LD A,(HL) | Is there already an uninterruptible subcommand routine address MSB there?
F9F2 | AND A
F9F3 | JR NZ,$F9F8 | Jump if so
F9F5 | LD (HL),B | Otherwise copy the routine address from BC into bytes 0x12 and 0x13 of the character's buffer, thus setting his uninterruptible subcommand
F9F6 | DEC HL
F9F7 | LD (HL),C
F9F8 | POP HL |
F9F9 | RET |