Skool Daze Routines
Prev: 31968 Up: Map Next: 31996
31985: Place routine address into bytes 105 and 106 of character's buffer
Used by the routines at 31996, 32048, 32158, 62208 and 62464.
BC Address of routine
H Character number (152-169)
31985 LD L,106 Copy the routine address from BC into bytes 105 and 106 of the character's buffer
31987 LD (HL),B
31988 DEC L
31989 LD (HL),C
31990 POP DE Drop the return address off the stack and place its LSB into byte 99 of the character's buffer; this ensures that when the routine whose address is in BC has finished, control resumes in the caller of this routine
31991 LD L,99
31993 LD (HL),E
31994 PUSH BC Make an indirect jump to the routine address in BC
31995 RET
Prev: 31968 Up: Map Next: 31996