home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
KAYPRO
/
HOTKEY11.LBR
/
HK101.IZF
/
HK101.INF
Wrap
Text File
|
2000-06-30
|
6KB
|
105 lines
HOTKEYS 1.01
Arrow Keys and Numeric Keypad Redefinition Program
(c) 1988, J.W. Olsen
15 May 1988
Like many quickie projects, HOTKEYS was developed to meet an immediate personal
need. Already, in its first couple of days several inquiries about it have
resulted. So it's now released into the public domain (with provisos outlined
at the head of source code files).
Through another program of mine, and DISKGUISE, (c) Roy Lipscomb, Logic
Associates in Chicago, I finally convinced my late-vintage Kaypro 10 to treat
its hard disk as Drives A: and B: (rather than B: and C:) at all times, even
if booted off a floppy. This was essential, especially after power
interruptions, because the K10 runs a BBS. The only problem has been that the
CONFIG.COM program sold with the computer which, among other things, normally
permits redefinition of the arrow keys and numeric keypad, became confused and
gave up in disgust. And, when in the CP/M world, I LIVE by redefined keys.
Enter HOTKEYS....
HK installs either of two redefinitions of the mentioned keys, depending upon
the command you enter when running it. It then gracefully exits without taking
up any of the preciously little available TPA memory. Of course, if perchance
you need more than two sets of definitions, you can easily configure two
versions. Or, with a little experience in assembler, you can extend HK to
include a larger number of configurations. (HK101 assembles to just slightly
over 0.5K size in its maximum configuration, so there's plenty of room for
expansion. The U-ROM version takes no more than 0.9K, and as little as about
0.64K if you only assign one keystroke per key.)
If you own a CP/M Kaypro without a U-ROM, skip this file and read HK101.ASM,
fully commented source code and the only thing you'll need to proceed.
Setting up the file to your preferences is a simple process. If you own a
Kaypro with a U-ROM, turn likewise to HK101-U.ASM.
If you own a different brand of CP/M machine, you still may be able to use
HOTKEYS. You or someone else familiar with 8080 assembler code may need to
make minimal--or possibly substantial--modifications, depending upon your
version of CP/M. Here's a guide to getting started. . . .
Check your documentation for CONFIG.COM or similar program which permits you
to permanently assign definitions to your arrow and numeric keypad keys on save
them to disk. (You'll also have to poke around in memory to determine the
system-dependent addrsses at which these definitions exist.) Even if you don't
own a program for this purpose, you may be able to make some determinations on
the following by, again, exploring memory.
* If your version of CP/M permits assignment of only one keystroke to each
of the mentioned keys, use HK101.ASM with its STRINGS equate set to NO. The
only other possible change will be a need to reset two offset addresses.
* If your CP/M permits assignment of more than one keystroke per key, but
limits the size of each definition to a fixed number (probably the case if you
can only assign a small number of keystrokes--say 3-5), first try the same
file with set STRINGS to YES and again playing with offset addresses. If
unsuccessful, you might consider the following paragraph.
* If you can assign a variable number of keystrokes to a single key (probably
the case if you can assign a large number--say 80), try HK101-U.ASM. It's
probable you'll have to do some other diddling with the source code in this
case after determining how the variable-length strings are sought by your
operating system. For example, they MIGHT be located by requiring that each
string be terminated with a given character (such as a 00H--a null). More
likely, like the source code already set for the U-ROM Kaypros, there's
probably a pointer table. In either case, modifications shouldn't be too
time consuming. I managed to decode the rather awkward and confusing
approach used by U-ROMs in an hour or two--effort already rewarded. With
the following procedure and the source code as a guide, your time commitment,
if any, is likely to be even less.
The best approach in making any adjustments which may be necessary is to
use a memory search program in conjunction with a screen-dump program.
First load the screen dump, then run the search program. (PATCH.COM is
excellent for this.) Then search for your CURRENT set of keystrokes
assigned to the arrow keys, later to the numeric keypad. When you find them,
send a "snapshot" of that part of memory to your printer and exit. Then, run
HOTKEYS as a test. Assuming it's unsuccessful yet the system didn't hang up
on you, take a shot of the same areas of memory as before. Exit the search
program and then ENTIRELY RESET YOUR MACHINE. (Some part of memory will have
been overwritten, and Murphy's Law is infallible in computing.) By comparing
the two "pictures" of memory, a pattern should emerge. . . .If you have an
operating system permitting "variable-length" redefintions,look at the first
snapshot not only for the strings involved and any characters which may
separate them, but also for any group of bytes which tend, at regular
intervals, to contain the LENGTHS of the strings. The U-ROM Kaypro, for
example, maintains a pointer to a string along with its length. The next
pointer is the combined total found by adding the preceding pointer and the
length associated with it, and so on for all strings. (Of course, remember
that all lengths, pointers and addition will be in hex, so you may find a
hex-to-decimal conversion chart invaluable.)
I've found HOTKEYS to be a very handy utility even in the short couple of
days since I've begun using them, and well worth the two evenings of effort.
I hope you will too. Comments and feedback encouraged.
-- J.W. Olsen
Advocate Enterprises, Ltd.
899 S. Plymouth Ct., Suite 504
Chicago, IL 60605
voice: 312.939.3300
For fastest replies, contact me at:
Sysop
The Advocate/NOWAR RCPM
312.939.4411 -- 24 hrs. -- 300/1200/2400 -- 8/n/1