<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 17 Apr 1990 12:48:27 PDT (Tuesday)
From   : Sprague.WBST311@Xerox.COM
Subject: WordStar 4.0 Console Patch Problem

I upgraded my copy of CP/M WordStar 3.3 to the newer 4.0 version, but am
having trouble getting the function keys on my keyboard to work.  Can
anyone give me a hand here?  The computer is a Xerox 820-II, with a low
profile keyboard, and 5.0 ROM's.

Since for the most part, the 820's function keys return values above '7F',
and do not use the "burst" mode used by 4.0's FUNDLY::/FUNTBL::, I could
not use WS's function key area.  I had to write my own console routines.
There are three optional console I/O routines that can be user supplied in
WS 4.0.  They are UCNSTA:: (User Console Status), UCONI:: (User Console
Input), and UCONO:: (User Console Output).  I only used UCNSTA:: and
UCONI::, as console output was fine the way it was.

The UCONI:: now checks first to see if a function key is already being
processed (multiple byte function).  If not, it gets the next character
from console using BDOS function 6, Direct I/O.  If this character is less
than '80' hex, it is passed back to WS.  If it is a function key, it
references a look up table containing the number of keystroke bytes to be
passed back, and the actual keystroke bytes.  A flag is set to show that
multiple bytes need to be passed, and the position in the look-up table is
stored.  The first keystroke is then passed back to WS.

If a function key IS being processed, it grabs the next byte from the
look-up table, and passes it back to WS, same process as before, except the
flag is cleared once all the bytes have been passed back.

The UCNSTA:: simply checks the process flag.  If it's true, it returns a
value stating that another character is ready from the console.  If it's
false, then it calls BDOS function 11, the console status function.  This
is how I handle the multiple byte functions from UCONI::.

It almost works, but not quite.  I must type slow, or some characters are
duplicated, while others are missed.  The cursor position is always
correct, even if a character is printed twice.  Also, if I try to load a
new document, WS locks up.  Old files load fine.

Can anyone give me a hand here?  I suspect maybe part of my problem is in
using BDOS Call 6, but I can't figure another way to get a character
without if first being output to the console.

~ Mike
Sprague.Wbst311@Xerox.Com


End of INFO-CPM Digest V90 Issue #69
************************************
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>