| Routines

F7B1: Change the primary command routine address

Used by the routines at 634C, 7A6A and F748. Places the address of the instruction following the CALL to this routine into bytes 0x08 and 0x09 of the character's buffer, thus making it the address of the character's primary command routine.
Input
H | Character number (0xD7-0xE5)
F7B1 | EX DE,HL | Collect the return address from the stack into DE
F7B2 | EX (SP),HL
F7B3 | EX DE,HL
F7B4 | LD A,L | Save L in A briefly
F7B5 | LD L,$08 | Copy the return address into bytes 0x08 and 0x09 of the character's buffer
F7B7 | LD (HL),E
F7B8 | INC L
F7B9 | LD (HL),D
F7BA | LD L,A | Restore the original contents of L
F7BB | EX DE,HL | Restore the return address to the stack
F7BC | EX (SP),HL
F7BD | EX DE,HL
F7BE | RET |