;---------------------------------------------------------------------- ; Get Pointers into the Free Space (1_Mar_84) ;-------------------------------------------- ; 1) This routine finds and records a) the Free Space Pointer, b) the ; Ims Buffer, and c) the Function Key Table starting address and ; Length ; 2) Register Usage: ; C -> holds the desired function key code ; DE -> holds length of desired data structure ; HL -> Enter pointing to the start of the free space pool. ; Get_Pointers: ld c,Id_FS call Find_a_Code ld (FS_Pointer),hl ;Save the Free Space Argument Pointer ld (FS_Length),de ; " " " " Length add hl,de ;HL:= Pointer to next entry ld c,Id_IMS call Find_a_Code ld (IMS_Pointer),hl ;Save the IMS Argument Pointer ld (IMS_Length),de ; " " " " Length add hl,de ;HL:= Pointer to next entry ld c,Id_FC call Find_a_Code ld (FC_Pointer),hl ;Save the Function Key Table Pointer ld (FC_Length),de ; " " " " " Length ret ; Find a Function Key Code ;------------------------- ; -This routine is only used by the Get_Pointers routine. ; Find_a_Code: ld a,(hl) ;Loop A:= Current function code inc hl ld e,(hl) inc hl ld d,(hl) ; DE:= Length of argument inc hl ; HL:= Pointer to Start argument cp c ; If (Current_FC eq Desired_FC) ret z ; Return add hl,de ; HL:= Pointer to next code jr Find_a_Code page