[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Re Keystrokes: Possible BIOS compatibility



** Reply to message from "Patricia M. Godfrey"  on Tue, 26
Jul 2005 16:50:06 -0400


> Robert's debugging version

KEYSTROKES uses a little known capability of XyWrite, the "VA_" operator, to
determine which key in the keyboard file uses a particular function. For
example, the value of  might be "F5" and  might be "F9" -- VA_
reflects the assignments in the currently LOADed KBD file.

OK, so how do we generate the list of functions that have particular keystrokes
assigned to them? We could plough through the KBD file and compile a list of
every function mentioned -- but that's a lot of work. We could compile a list
of all known functions and then test them one by one. But, again, there are
numerous undocumented functions, and anyway, NBWin adds more.

What happens if a function isn't assigned in the current KBD file? VA_ returns
an empty string -- nothing. What happens if a function doesn't even exist,
such as ? Again, nothing happens, an empty string is returned.

So what I do is take all of the characters in string one
(#$&@ABCDEFGHIJKLMNOPQRSTUVWXYZ) and pair them with all of the characters in
another string (0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZ). Thus, "#" is paired
with every char in string two, then "$" is paired with every char in string
two, then "&" is paired, then "@", "A", and so on to the end,
"Z". I think its
30*37 pairs -- how many is that? 1,110. Every pair is tested as the two "xx"
chars in a  statement. If it returns a keyname like "Gray Enter", then
that means that the pair is used in the KBD file, and so it is added to the
KEYSTROKES report -- otherwise it is tossed away.

Therefore, this procedure ends up testing a LOT of non-existent functions,
because there is no science to it -- just a brunt force approach, but very
pithy and very effective. On my machine, it bombs against one pair only, MS,
which is an actual function in XyWin and NBWin (it reports Windows functions),
and which may have been in some sort of nascent (or perhaps suppressed) state
in the Xy4 code. Since Erickson was developing Xy4 and XyWin simultaneously,
it makes sense to me that he would use the same base code for both engines, and
just have a few different branches for DOS and Windows respectively. At base,
Xy4 and XyWin are the same thing.

> |MS|NI|NL|RQ|UV|

Well, bingo again. Good work, Patricia. I'm really dubious about non-existent
"funcs" RQ and UV; you might double check by removing them one at a time from
the exclusion list -- you might double check *all* of them, one by one (remove
one at a time). Otherwise, I'm gonna insert them all in the master frame, and
go with it. This works on all 5 of your "misbehaving" computers, right?

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------