| Routines

63981: Initialise an uninterruptible subcommand if possible

Used by the routines at 64162 and 64338. Places the address of an uninterruptible subcommand routine into bytes 18 and 19 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 (215-229)
BC | Uninterruptible subcommand routine address
63981 | PUSH HL |
63982 | LD H,A | Point HL at byte 19 of the character's buffer
63983 | LD L,19
63985 | LD A,(HL) | Is there already an uninterruptible subcommand routine address MSB there?
63986 | AND A
63987 | JR NZ,63992 | Jump if so
63989 | LD (HL),B | Otherwise copy the routine address from BC into bytes 18 and 19 of the character's buffer, thus setting his uninterruptible subcommand
63990 | DEC HL
63991 | LD (HL),C
63992 | POP HL |
63993 | RET |