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 / CPM / CCP / HIST197.AZT / HIST197.ART
Text File  |  2000-06-30  |  5KB  |  88 lines

  1.                   HIST197.LBR: Recalling Commands in CP/M
  2.  
  3.      Do you growl when you have to re-enter a long command line that was 
  4. rejected because you got one letter wrong?  Don't you hate to retype the 
  5. same line again and again with just minor changes?  Wouldn't you love to 
  6. recall that sequence of commands you gave about 20 lines back?   
  7.  
  8.      Those of you who work on a VAX/VMS system know that by proper use of 
  9. the arrow keys you can, in fact, recall any of your last 20 commands, edit 
  10. them, and replay them to your heart's content.  (I understand that UNIX 
  11. offers a similar capability.)  
  12.  
  13.      Well, gnash your teeth no longer -- you can now have it in CP/M too.  
  14. HISTORY.LBR, version 1.9, from Stuart Rose of Starling RCMP+, has made it 
  15. possible whether you use CP/M 2.2 (CP/M-80) or CP/M 3.0 (CP/M+).  That is, 
  16. you can have it in CP/M 2.2 if you are willing to give up about 5.3K of your 
  17. precious 64K.  
  18.  
  19.      I was willing.  I will go to any lengths to make my fingerwork at the 
  20. keyboard more efficient, so I eagerly tried out HISTORY on my Kaypro II '83.  
  21. It worked beautifully!  Until the first Warm Boot, when it disappeared.  Hmm 
  22. -- there must be a way to fix that.  And, too, make it look more like 
  23. VAX/VMS so I won't get so confused.  And make it less of a memory hog.  And 
  24. implement the CTRL-P printer toggle.  And omit saving responses within 
  25. applications programs that are too short to be worth recalling.  And make it 
  26. compatible with NSWP 2.07.  And ...
  27.  
  28.      So I went to work tuning up version 1.9 to suit my own needs.  The 
  29. result is called HIST197, nominally the seventh revision of HISTORY 1.9.  
  30. (Believe me, there were a lot more than 7!)  No matter that the amount of 
  31. time and fingerwork I invested vastly exceeds the grand total of what I will 
  32. save in the rest of my CP/M life -- I am now so much more "efficient"!  Of 
  33. course, HIST197 has a few unpolished edges, but it really works and has done 
  34. no damage to my programs or documents.  
  35.  
  36.      HIST197 loads a memory-resident "daemon" that looks and feels almost 
  37. exactly like VAX/VMS (4.0 or higher).  For those of you who are comfortable 
  38. with WordStar, most of Stuart's original WordStar-like keystrokes are still 
  39. there.  The daemon loaded by HIST197.COM saves more command lines than the 
  40. one loaded by version 1.9, yet is substantially smaller.  
  41.  
  42.      Here's how to use HIST197.  First load the daemon by typing HIST197 
  43. with the appropriate disk drive prefix.  Give a few commands to CP/M for a 
  44. trial.  Now recall your last command with the up arrow (or CTRL-W).  You can 
  45. keep recalling earlier and earlier commands this way up to a maximum of 23.  
  46. Go back down the list with the down arrow (or CTRL-Z).  With a single ! 
  47. command, you can see all of your previous commands, or rather, as many as 
  48. will fit on a Kaypro II screen (23).  The commands are "numbered"; if you 
  49. want to recall command number n, just type !n.  
  50.  
  51.      So now you have a previous command line at your disposal.  To replay 
  52. it, press RETURN.  If you want to change some characters before replay, use 
  53. the left arrow (or CTRL-S) or the right arrow (or CTRL-D) to move the 
  54. cursor.  CTRL-B takes the cursor to the beginning of the line.  Then you can 
  55. overstrike with the correct character(s).  You can toggle between overstrike 
  56. mode and insert mode with CTRL-A (or CTRL-V).  To delete the character at 
  57. the cursor, type CTRL-G.  To get rid of the one to the left of the cursor, 
  58. use the DEL key.  You can also overstrike with spaces between whole words of 
  59. a command -- CP/M won't mind the spaces.  
  60.  
  61.      The standard CP/M printer on/off toggle, CTRL-P, is implemented in 
  62. HIST197.  The default option saves only commands to CP/M.  To enable recall 
  63. of your responses to an applications program as well, type CTRL-O (even in 
  64. the middle of a response); type CTRL-O again to toggle back to saving CP/M 
  65. commands only.   
  66.  
  67.      As mentioned above, you load the daemon by simply typing HIST197.  You 
  68. can easily patch the system tracks on your boot-up diskette so that this 
  69. will be done automatically for you on a cold start.  If you need to recover 
  70. the memory space occupied by the daemon and the CCP, you can unload the 
  71. daemon by typing HIST197 u (or any character, even a space, beyond the 7).  
  72. If you type HIST197 when the daemon is already resident, the daemon will be 
  73. reloaded and all of your saved commands will be wiped out.  (I can't see why 
  74. you would want to do this, but if you do it be sure to give CTRL-C as your 
  75. first command after the reload -- there's a bug lurking here that hasn't 
  76. been squashed.)  
  77.  
  78.      The whole story is in HIST197.LBR.  This library includes HIST197.COM, 
  79. which is suitable for a Kaypro II and patchable for other CP/M 2.2 machines.  
  80. If you don't like my choice of features or key assignments, you can easily 
  81. substitute your own in the source program and reassemble.  For CP/M 3.0, it 
  82. is essential to have HISTORY.LBR in order to build a .COM file.  
  83.  
  84.  
  85. April 4, 1987                                Melvyn L. Halbert
  86.                                              104 Morgan Road
  87. (615) 483-0717 (voice only, 7-10 pm EDT)     Oak Ridge, TN 37830
  88.