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
Text File  |  2000-06-30  |  6KB  |  105 lines

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