| Routines

63409: Change the primary command routine address

Used by the routines at 25420, 31338 and 63304. Places the address of the instruction following the CALL to this routine into bytes 8 and 9 of the character's buffer, thus making it the address of the character's primary command routine.
Input
H | Character number (215-229)
63409 | EX DE,HL | Collect the return address from the stack into DE
63410 | EX (SP),HL
63411 | EX DE,HL
63412 | LD A,L | Save L in A briefly
63413 | LD L,8 | Copy the return address into bytes 8 and 9 of the character's buffer
63415 | LD (HL),E
63416 | INC L
63417 | LD (HL),D
63418 | LD L,A | Restore the original contents of L
63419 | EX DE,HL | Restore the return address to the stack
63420 | EX (SP),HL
63421 | EX DE,HL
63422 | RET |