[GEM Development] GEM/XM VDI source

Ben A L Jemmett ben.jemmett at ukonline.co.uk
Fri Mar 3 10:57:04 PST 2006


I spent an hour or so last night poking around with the GEM/XM GDOS's INT
16h (BIOS keyboard services) hook.  As we know, XM's pop-up menu works fine
in certain DOS applications but not in others -- for instance, it doesn't
work with COMMAND.COM under Windows 98 or OpenDOS 7.03, or with FreeDOS's
command interpreter, but it does work in the Pacific C IDE or at the command
line in MS-DOS 3.3

Initially I looked at COMMAND.COM under OpenDOS 7.03; it gets its keyboard
input using DOS's 'read from standard input' function, which calls the BIOS
in a loop to check for a new character and then retrieves it when there's
one there.  However, it calls INT 16 function 10h and 11h, which are
read/poll extended keystroke.  XM's GDOS only hooks functions 0h and 1h,
read/poll standard keystroke.

In the source code we originally received for XM, *only* functions 0, 1 and
2 were handled (2 was always passed through to the BIOS, 0 and 1 were passed
through if there was nothing in the paste buffer); everything else became a
no-op.  Several years ago I made a minor modification to the replacement
interrupt handler to pass through all functions *except* 0 and 1, which were
intercepted by the XM code -- that fixed keyboard input to COMMAND.COM, and
I suppose had I thought about it for thirty seconds I would have realised
that meant some other functions were being used for keyboard input in modern
code!

I have a free weekend, so unless anybody else is looking at this I might
have a go at adapting the current gd_int16 routine to handle functions 10h
and 11h properly as well -- I experimented briefly last night but had
limited success.

Regards,
Ben A L Jemmett.
(http://web.ukonline.co.uk/ben.jemmett/, http://www.deltasoft.com/)



More information about the gem-dev mailing list