home *** CD-ROM | disk | FTP | other *** search
- WSKEYPAD.DOC - DOCUMENTATION FOR WSKEYPAD.ASM / WSKEYPAD.AZM
-
- Copyright 1989 by Dale H. Cook
-
- This document may be freely distributed provided that it is distributed in
- whole with no alteration or modification in form or content, that all
- copyright notices remain intact, and that no charge is made other than a
- nominal distribution fee. All commercial distribution of this program in part
- or in whole without the express written consent of the author is strictly
- prohibited. The author may be reached at: CompuServe 71370,2635.
-
-
- The programmable cursor and keypad keys on the CP/M Kaypro computers
- can be configured as function keys for WordStar. The CONFIG.COM program
- supplied by Kaypro lets you make this configuration permanent by changing
- the System tracks on a bootable floppy. If you use a hard disk, or keep
- other programs on your WS disk (such as SuperZap) that expect the stock Kaypro
- cursor keys, things can get sticky. My solution is to patch WS4 so that the
- keys are set to WS functions when WS is run, and reset to the original Kaypro
- values when exiting WS. MicroPro has kindly provided plenty of patch space for
- the user, and PATCH.LST on the WordStar 4.0 disks has the information needed
- to install a patch. The programs WSKEYPAD.ASM (Intel/8080 mnemonics for the
- Digital Research ASM assembler) and WSKEYPAD.AZM (Zilog/Z80 mnemonics for Mike
- Rubenstein's Z80MR assembler) will patch WS4 on your Kaypro. You will also
- need MLOAD.COM to overlay the patch onto WS.COM.
-
- First of all, read KEYPAD.TXT and perform the experiments described
- there. This will show you how the programmable keys work. Next, decide what
- values you want for your keys under WS. You will probably want the cursor keys
- to have the WS cursor commands ^E, ^X, ^S and ^D, but you may want different
- keypad functions than the ones I've chosen. I've found it helpful to draw
- diagrams like those below to help decide what values to assign to the keys.
- The values shown are those of the distribution version of WSKEYPAD.ASM/AZM.
-
-
- CURSOR (ARROW) KEYS
-
- +-------+-------+-------+-------+
- | ^ | | | <-- | --> |
- | | | v | | |
- | ^E | ^X | ^S | ^D |
- +-------+-------+-------+-------+
-
-
- NUMERIC KEYPAD
-
- +-------+-------+-------+-------+
- | 7 | 8 | 9 | - |
- | | | | |
- | ^C | ^KB | ^QC | ^KV |
- +-------+-------+-------+-------+
- | 4 | 5 | 6 | , |
- | | | | |
- | ^R | ^KK | ^QR | ^KC |
- +-------+-------+-------+-------+
- | 1 | 2 | 3 | |
- | | | | |
- | ^KD | ^KQ | ^KS | |
- +-------+-------+-------+ ENTER +
- | 0 | . | |
- | | | |
- | ^Y | ^KY | ^N |
- +-------+-------+-------+-------+
-
-
- Edit the WSKEYPAD file to include your function values in the small and
- large keytables (SMNEW and BIGNEW). Remember that a single-byte value can go
- directly into SMNEW (and the corresponding line in BIGNEW should contain four
- NULs - 00h). Two- to four-byte strings (padded with NULs to four bytes) go
- into BIGNEW, with a NUL in the corresponding line in SMNEW. Also, if you use
- any control characters other than those I use, their equates must go into the
- ASCII equate table near the top of the file.
-
- Since you have already performed the experiments in KEYPAD.TXT (you have,
- haven't you?) you know how to find the start of the small key table in your
- BIOS and the offset to the large key table. Change the equates for SMKEY and
- OFFSET to match your system.
-
- Now let's check a few other equates. Print out a copy of PATCH.LST, and
- then look at your _installed_ copy of WS.COM. The addresses of INISUB, UNISUB,
- MORPAT and RAM1ST should be the same as shown in WSKEYPAD. The _data_ at
- RAM1ST's address is the value equated to EXTRA. You may have to change this
- equate, depending on your installation of WS. Finally, the three-byte
- sequences at INISUB and UNISUB in your _installed_ WS must be copied into
- INI 1-3 and UNI 1-3 in WSKEYPAD.
-
- Now we're ready to go. Assemble WSKEYPAD (.ASM for ASM.COM, .AZM for
- Z80MR.COM) and use MLOAD to overlay the _installed_ WS file:
-
- MLOAD WS.COM=WS.COM, WSKEYPAD.HEX
-
- That's it! Have fun with your customized WordStar 4.0. Those of you with
- other machines with programmable keypads may be able to use this information
- to write a patch for your machines. If you have any questions I can be reached
- on CompuServe in the CP/M and Computer Club Forums at 71370,2635.
-
- - Dale H. Cook
- July 3, 1989