Compilers targeting DOS typically provide macros to manipulate the segment and offset of far pointers. FP_SEG(pointer) provides access to the segment portion, FP_OFF(pointer) to the offset. It's also possible that there's a MK_FP(segment, offset) or FP_CONSTRUCT(segment, offset) macro to combine segment and offset into a pointer.
This discussion in comp.os....
An easier way to fix this problem is to execute a small program called "Keyfix.com" that was supplied, largely un-documented, with some OEM distributions of MSDOS 3.2 and 3.3.
will check the keyboard in use and advise whether keyfix needs to be installed.
Hope this helps.
If your game actually was Holtzman and Kershenblatt's Castlequest, you'll be thrilled to know that that game is no longer lost! With help from Mark Kershenblatt, the Fortran source code has been retrieved from the U.S. Copyright Office and patched up to work on modern Fortran compilers. See
"Castlequest exhumed!" (2021-03-09)