home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / tcj / tcj30.ws < prev    next >
Encoding:
Text File  |  1994-09-02  |  36.0 KB  |  683 lines

  1.      After the tremendous effort I put into producing my last column andì
  2. ZCPR33 before leaving on summer vacation, I was really burned out.  Iì
  3. hardly touched the computer or even thought about programming all summer. ì
  4. This was quite remarkable, since for months I had practically lived inì
  5. front of that computer screen and thought I would have severe withdrawalì
  6. symptoms if I didn't get my usual daily fix.  I was glad the last issue ofì
  7. TCJ came out a bit behind schedule, because three weeks ago I reallyì
  8. couldn't think of anything to write about for this column.
  9.  
  10.      Then the bug struck again, as I knew it would eventually.  My mindì
  11. exploded with ideas, and, as in the past, I again have far more things toì
  12. talk about than I will have the energy or time to get down on paper beforeì
  13. this article has to be sent in.
  14.  
  15.  
  16.                                Echelon and I
  17.                                -------------
  18.  
  19.      I practically fainted when I saw the byline on my last column, and Iì
  20. wonder if both Echelon and my real employer did too!  The byline read:ì
  21. "Jay Sage, Echelon, Inc."  I guess Art Carlson misinterpreted my statementì
  22. that I had joined the Echelon team.  In no way am I an employee orì
  23. official representative of Echelon.  In real life I am still a physicistì
  24. at MIT doing research on special analog(!!) devices and circuits for imageì
  25. processing and neural-like computing.  Digital computing is stillì
  26. essentially a hobby.
  27.  
  28.      The members of 'The Echelon Team' are independent programmers whoì
  29. cooperate with Echelon and each other to advance 8-bit, CP/M-compatibleì
  30. computing.  Other members of that team, to mention only a few, are Bridgerì
  31. Mitchell, author of DateStamper, BackGrounder, and JetFind; Joe Wright,ì
  32. author of the auto-install Z-System and the BIOSs of most of the recentì
  33. popular 8-bit computers (Ampro, SB-180, On!); and Al Hawley, sysop of Z¡
  34. Node #2 (the only one to sign up for a node before I did) and author ofì
  35. the REVAS disassembler and the new ZAS.
  36.  
  37.  
  38.                    Supporting 8-Bit Software Developers
  39.                    ------------------------------------
  40.  
  41.      Though team members have no personal stake in Echelon as employees orì
  42. owners, they do benefit to some extent from royalty payments for theirì
  43. software that is sold.  Nevertheless, before turning to the technicalì
  44. material for this issue, I would like to make an unabashed plea to all ofì
  45. you to support Echelon and the small number of other companies stillì
  46. developing 8-bit software by purchasing their products.  They are the onlyì
  47. hope for the sustained vitality of our 8-bit world.  If we don't buy theì
  48. products they offer, the creative programmers who have not already done soì
  49. will have no choice but to abandon Z80 programming in favor of the moreì
  50. lucrative IBM-compatible market.  Check the ads in The Computer Journal,ì
  51. and support the companies that advertise there.  Do not make regular useì
  52. of illegitimate copies of their software; buy your own.
  53.  
  54.      Unfortunately, no one is getting rich on 8-bit software.  I did notì
  55. keep a record of the time I spent on ZCPR33, so I cannot calculateì
  56. accurately the effective hourly rate, but a rough estimate indicates thatì
  57. babysitting would probably have been a better way to make money.  In fact,ì
  58. my greatest financial reward probably came from the money not spent onì
  59. babysitters as a result of staying home programming instead of going out!
  60.  
  61.      While reflecting on these issues, I thought I had a brilliant idea --ì
  62. put together a transportable computer and actually hire myself out as aì
  63. babysitter.  That way I could get paid not only for the commercialì
  64. products like ZCPR33 but for all the public-domain programs as well. ì
  65. Unfortunately, on more careful consideration, I noted some serious defectsì
  66. in this scheme.  First or all, how many people would hire me to sit nightì
  67. after night until 2 or 4 in the morning?  And who would want a babysitterì
  68. who wouldn't notice the house burning down until the power went out on hisì
  69. computer screen?
  70.  
  71.      Basically, I think it is fair to say that all of us (even those, likeì
  72. Joe Wright, who depend on it for their livelihood) are in the 8-bitì
  73. programming business because we love it.  Even for the nonprofessionals,ì
  74. like me, there are reasons why some financial compensation is important. ì
  75. While we may derive enormous enjoyment and excitement from programming,ì
  76. our families do not, but if it brings in a little extra spending moneyì
  77. that the entire family can share, they are much more tolerant of the longì
  78. hours spent in front of the CRT or on the telephone helping users withì
  79. problems.
  80.  
  81.  
  82.                      New Commercial Z-System Software
  83.                      --------------------------------
  84.  
  85.      As a transition from my 'soap box' remarks above, I would like toì
  86. begin the technical discussion with a review of some exciting developmentsì
  87. in commercial Z-System software.
  88.  
  89.  
  90.                             WordStar Release 4
  91.  
  92.      The most exciting development in a long time is the appearance fromì
  93. MicroPro of WordStar Release 4, CP/M Edition.  As far as I can remember,ì
  94. this is the first new CP/M product from a major software house since Turboì
  95. Pascal version 3 came out several years ago, and it is the only productì
  96. ever from a major vendor that supports Z-System.  I am thrilled at theì
  97. official recognition this bestows on Z-System.
  98.  
  99.      For the season's kickoff meeting of the Boston Computer Society'sì
  100. CP/M Computers Group, we had representatives from MicroPro to introduceì
  101. the new product.  As excited as I was about Release 4, I was sure thatì
  102. this would be the end of the line, so I was quite surprised when theì
  103. representatives talked about a release 5 for CP/M as well as for MS-DOS.
  104.  
  105.      MicroPro speaks of itself now as the 'New' MicroPro, and, indeed,ì
  106. they sounded like a new MicroPro.  They are extremely solicitous of userì
  107. suggestions.  Their upgrade policy is very generous (they'll happilyì
  108. accept the serial number from any older WordStar or NewWord), and theì
  109. upgrade price of $89 for individuals and $79 for clubs is very attractive. ì
  110. Echelon's special offer at $195 for those who did not own WordStar orì
  111. NewWord before is also quite reasonable for such a high quality product. ì
  112. I personally have not made much use of WordStar in the past, preferring myì
  113. roll-my-own, do-it-my-way PMATE text editor, but I have already placed myì
  114. order for WS4, if for no other reason than to show my support to MicroProì
  115. and to encourage them to stick with us 8-bitters.
  116.  
  117.      Frankly, I am also quite eager to explore WS4's new Z features. ì
  118. Since my copy has not arrived yet, I cannot give you a first-hand report,ì
  119. but what I have been hearing from others is extremely positive.  Itì
  120. apparently knows about the command search path and named directories ofì
  121. ZCPR3 and can run as a true shell.  The documentation included withì
  122. WordStar 4 is extraordinary, the equivalent at least of the customizationì
  123. package that the 'old' MicroPro used to charge an extra $500 for!  Noì
  124. longer will the hobbyists have to ferret out all the patch points for theì
  125. program (though I am sure there will be plenty of areas, nevertheless, toì
  126. keep us entertained).
  127.  
  128.  
  129.                                 ZAS/ZLINK
  130.  
  131.      Another exciting development is release 3 of ZAS/ZLINK, Echelon'sì
  132. assembler/linker (and librarian) package.  As many of you may know, mostì
  133. serious programmers -- Echelon team members included -- have had littleì
  134. but scorn for ZAS in the past.  It was a strange and unreliable assembler.
  135.  
  136.      But Echelon has now really made good on ZAS.  They did it right thisì
  137. time.  They did not go back to the original author and try once again toì
  138. get him to fix it; instead they brought in the highly competent Al Hawley. ì
  139. Though I am sure it is still not perfect (what program is), it hasì
  140. correctly assembled all correct code that I have fed to it.  And gone areì
  141. its former irritating and unique idiosyncrasies, like square bracketsì
  142. instead of parentheses in arithmetic expressions.  ZAS will now handleì
  143. just about any code written in some semblance of standard assemblyì
  144. language.  It supports a rich set of pseudo-ops, making it tolerant ofì
  145. common variants.
  146.  
  147.      ZAS and ZLINK are also at long last honest Z-System tools, as befitsì
  148. an Echelon product.  They recognize named-directory references for allì
  149. files, and they communicate with the Z3 environment and message buffers. ì
  150. With an appropriate editor it is possible to build a code developmentì
  151. system like that in Turbo Pascal.  When ZAS encounters errors in assembly,ì
  152. it stores enough information about the first error in the environment thatì
  153. an editor can automatically locate the line with the error.  Thus one canì
  154. make an alias that bounces between the assembler and the editor in veryì
  155. convenient fashion.  As an added bonus, the Echelon version of ZASì
  156. includes, as the one from Mitek always did, the option to generate in-lineì
  157. assembly code for Turbo Pascal.
  158.  
  159.      If you have an older version of ZAS/ZLINK, you should definitelyì
  160. order the upgrade, priced at just $20 for the software alone or $30 withì
  161. an updated manual.  If for some reason you do not want to do that, youì
  162. should at least destroy any copies of the older versions that you haveì
  163. lying around.
  164.  
  165.                                  New ZCOM
  166.  
  167.      Now I would like to move forward in time and talk about a productì
  168. that is in the works (though with the delay between when I write theseì
  169. columns and when they reach readers, it may be on sale by the time youì
  170. read this).  This product is New ZCOM, or NZCOM, Joe Wright's utterlyì
  171. spectacular follow-on to ZCOM.  This product will make manually installedì
  172. Z-Systems obsolete, because manually installed systems will now offer lessì
  173. performance than NZCOM systems.
  174.  
  175.      First some history.  In the summer of 1984 Joe Wright was reflectingì
  176. on the difficulty of converting stock CP/M2.2 systems to ZCPR3 andì
  177. wondering if an automatic method could not be developed.  Rick Connì
  178. apparently opined that such a thing would not be possible.  Joe did notì
  179. ask me (we did not know each other at the time), but if he had, I wouldì
  180. have told him the same thing -- impossible!  You know the old marines'ì
  181. saying: the difficult we do immediately; the impossible takes a littleì
  182. longer.  Well, Joe didn't even take very long to do the impossible.  In aì
  183. matter of weeks he had a fully working version.
  184.  
  185.      ZCOM had two drawbacks compared to a manually installed Z-System. ì
  186. First, it required an extra 0.5K of overhead.  Secondly, and ultimatelyì
  187. more seriously, it was not flexible.  One had to accept a standardì
  188. configuration.  There was no choice of command processor options, numberì
  189. of named directories, size of RCP, and so on.  Thus, ZCOM was the Z-Systemì
  190. of choice only when a manual system could not be made, either for lack ofì
  191. skill or lack of BIOS source code.
  192.  
  193.      Since the new computer I bought at work in 1984, a WaveMate Bullet,ì
  194. to my chagrin did not come with source for the BIOS, I tried briefly toì
  195. figure out how to get ZCPR3 installed without BIOS modifications.  I cameì
  196. up with an approach that might have worked, but before I got very far withì
  197. its development, Echelon announced Z3-DOT-COM and, shortly thereafter,ì
  198. ZCOM.  I bought them right away.  After a short time, I figured out howì
  199. they worked (and was amazed at Joe's cleverness).  Then I began toì
  200. implement the modifications I described in my last two columns, includingì
  201. ways to switch between different auto-install systems from within aliasì
  202. scripts and while inside shells.
  203.  
  204.      Later, after I became acquainted with Joe, I told him about my ideasì
  205. for an enhanced ZCOM.  It seemed, however, that he was much too busy atì
  206. the time with other products to give any attention to ZCOM, so I decidedì
  207. that my next project after ZCPR33 would be a program that I tentativelyì
  208. called Dyna-Z.  This would be a dynamic Z-System, an operating systemì
  209. whose configuration could be changed on the fly.
  210.  
  211.      Dyna-Z would be useful in several ways.  One could normally run aì
  212. system with all the standard ZCPR3 modules except an IOP (input/outputì
  213. package), giving one a good set of ZCPR3 features for normal operations. ì
  214. When one wanted to make use of an IOP, like Joe Wright's superb NuKeyì
  215. keyboard redefiner program, a load alias would first check to see if anì
  216. IOP space was available in the system.  If so, NuKey would be loaded.  Ifì
  217. not, the alias would switch the operating system to one that did includeì
  218. an IOP and then load NuKey.  One would sacrifice the 1.5K of TPAì
  219. (transient program area -- the memory available for a program to work in)ì
  220. only while one needed the benefits of NuKey.
  221.  
  222.      On the other hand, when one invoked a command such as WordStar 4 or aì
  223. spreadsheet that required a large TPA, an alias for that command wouldì
  224. first switch to a Z-System with no IOP or RCP, increasing the TPA by 3.5Kì
  225. compared to the full Z-System.  One could even drop the FCP (0.5K) and/orì
  226. the NDR (0.5K typically).  When the memory-hungry program was finishedì
  227. running, the remainder of the alias script would reload the standardì
  228. version of Z-System.  One would hardly know that the operating system hadì
  229. been different while WordStar or the spreadsheet was running.
  230.  
  231.      Thus Dyna-Z would not only overcome the major disadvantage of ZCOMì
  232. but would also overcome the only intrinsic disadvantage of ZCPR3 -- theì
  233. loss of TPA space.  A minimum Z-System would use only 0.75K plus theì
  234. autoinstall overhead (reduced to a mere 0.25K), a very small sacrifice forì
  235. all the benefits that Z-System offered.  And in a real pinch for TPA, oneì
  236. could even drop out of Z-System temporarily and run standard CP/M with itsì
  237. maximum possible TPA.  Using SUBMIT, even this could be done with aì
  238. script!
  239.  
  240.      I was delighted this summer when Joe Wright called on the phone toì
  241. discuss his plans for New ZCOM.  It was the first I knew that he had takenì
  242. up the project, and I found that he had already made great progress.  Manyì
  243. of the features I had planned for Dyna-Z were already implemented, and Joeì
  244. was eager to incorporate the rest.  Our partnership was born!  And it is aì
  245. perfect partnership for me -- Joe is doing all the work.
  246.  
  247.      I would have been excited enough just to see the Dyna-Z features inì
  248. NZCOM, but Joe has done much more than that.  He has made the process ofì
  249. building a system of your choice about as easy as it could possibly be. ì
  250. You simply edit NZBAS.LIB, a text file describing the system configurationì
  251. you want, and assemble all the individual components (CCP, DOS, RCP, FCP,ì
  252. etc.) to Microsoft-format REL files.  NZCOM.COM then generates a systemì
  253. auto-loader program for you automatically.  It will even allow you toì
  254. clone an existing system, accomplishing automatically all the complexì
  255. processes I described in my last two columns.
  256.  
  257.  
  258.                                  JetFind
  259.  
  260.      Now I would like to switch back in time and describe a program thatì
  261. has been around for a while already but has not had the publicity I thinkì
  262. it deserves.  It suddenly struck me the other day just how often and inì
  263. how many ways I use JetFind yet how few people probably are aware of itsì
  264. existence.
  265.  
  266.      JetFind, by Bridger Mitchell, is basically a text finding program. ì
  267. It is something like Irv Hoff's publicly released FIND.COM, which canì
  268. search through a file for a specified text pattern.  But it goes orders ofì
  269. magnitude beyond that.
  270.  
  271.      To begin with, I should explain that JetFind operates in either ofì
  272. two modes: interactive or command mode.  In interactive mode, the programì
  273. is invoked alone, with no command tail.  It will then prompt the userì
  274. sequentially for each piece of information it needs.  The user can thenì
  275. live inside JetFind, performing one search after another until he issuesì
  276. an exit command.  Alternatively, a single search operation can be carriedì
  277. out by including all the necessary information on the command line.
  278.  
  279.      Now for the capabilities of JetFind.  First of all, JetFind is notì
  280. limited to searching the text for only a single pattern at a time.  It canì
  281. search for multiple patterns, and each one can be either a simple textì
  282. string or a regular expression (a UNIX concept).  Let's take a simple caseì
  283. first.  Suppose you want to find all lines that contain either "Smith" orì
  284. "Jones".  In interactive mode you would enter the patterns one at a timeì
  285. in response to the prompt.  Just hitting carriage return would end patternì
  286. input.  In command mode, you would enter for the search pattern theì
  287. following expression:
  288.  
  289.                 SMITH|JONES
  290.  
  291. The special character '|' represents 'or'.  From command mode, of course,ì
  292. one cannot distinguish upper and lower case.  To do that you must useì
  293. interactive mode.
  294.  
  295.      Now let's consider a more complex search that would make use of aì
  296. regular expression.  Suppose we want to find all labels in an assemblyì
  297. language program.  We could use the following regular expression:
  298.  
  299.                 [A-Z][A-Z0-9]*:
  300.  
  301. The first term in brackets means a character from the set of lettersì
  302. ranging from 'A' to 'Z'.  The second term in brackets is the set includingì
  303. the digits from '0' to '9' also, i.e., an alphanumeric character.  Theì
  304. asterisk means that the previous character specification may occur anyì
  305. number of times, including zero times (a '+' would require at least oneì
  306. occurrence).  Finally the colon on the end represents the ':' character
  307.  
  308.      If labels have to be at the left margin, we could use the regularì
  309. expression
  310.  
  311.                 ^[A-Z][A-Z0-9]*:
  312.  
  313. A caret at the beginning of an expression indicates the beginning of aì
  314. line.  A mode control specification (explained later) can tell JetFindì
  315. whether or not to ignore case.  If other characters are allowed in labels,ì
  316. they could be listed inside the brackets as well.
  317.  
  318.      There is not enough space here to give a complete description ofì
  319. JetFind's regular expression syntax.  Suffice it to say that it canì
  320. perform just about any search you would ever want to do.
  321.  
  322.      A second major feature of JetFind is that it is not limited toì
  323. searching single files; you can specify whole collections of files toì
  324. search.  You can give a list of ambiguous file specifications both forì
  325. files to include in the search and files to exclude from the search. ì
  326. These files can all come from a single directory, or files from manyì
  327. directories can be included.  For example, the file list
  328.  
  329.                 TEXT:*.D?C ~TEXT:A*.*
  330.  
  331. indicates all files in the named directory TEXT (yes, JetFind is fullyì
  332. ZCPR3-compatible) with a file type of D?C but not (that is the meaning ofì
  333. the '~' prefix) files whose name begins with 'A'.  Note the '?' in theì
  334. file type.  The intention here is to search all DOC files.  By includingì
  335. the '?' for the middle letter, files of type DQC (squeezed DOC files) andì
  336. DZC (crunched DOC files) will be included as well.  JetFind automaticallyì
  337. uncompresses both squeezed and crunched files as it searches.
  338.  
  339.      Moreover, JetFind is not limited to searching individual files.  Itì
  340. can even search through members of libraries.  If the first file name inì
  341. the list of files is an LBR file, then the rest of the list is taken as aì
  342. specification of the members of that library to be included in or excludedì
  343. from the search.  As with individual files, these files can be unsqueezedì
  344. or uncrunched on the fly.
  345.  
  346.      As if this were not enough, JetFind has about a dozen mode controlì
  347. options that define how it performs the search and what it does with theì
  348. text identified by the search.  Here are descriptions of just a few.
  349.  
  350. C     This option just counts and displays the number of matches without
  351.       showing the matching lines of text.
  352.  
  353. N     The lines containing matching text will be numbered in the listing
  354.       to make it easy to find them with an editor.
  355.  
  356. Rmn   This specifies a display region ('m' and 'n' are each digits from 0
  357.       to 9).  For each line containing a match to one of the patterns, the
  358.       previous 'm' lines and following 'n' lines will also be included in
  359.       the display to provide context.
  360.  
  361. I     Case will be ignored so that 'a' and 'A' will be considered to
  362.       match.
  363.  
  364. B     Begin displaying the text as soon as the first match has been found.
  365.  
  366. V     Reverse the test and display only lines that do not match any of the
  367.       specified patterns.
  368.  
  369. T     Type the file, extracting it from a library and/or uncompressing it
  370.       as required.
  371.  
  372. With these and other options not listed above, JetFind can be made toì
  373. perform many tasks besides searching, such as typing files, extractingì
  374. files from libraries, splitting off parts of files, and displaying filesì
  375. in a directory or library.
  376.  
  377.      We're not finished yet!  JetFind also supports full input/outputì
  378. redirection.  The output text that is shown on the screen can additionallyì
  379. be saved to a file, either in a new file or appended to an existing file. ì
  380. The set of patterns to search for can also come from a file.  Thus weì
  381. could have the command
  382.  
  383.         JETFIND -WN <ASM:LABEL.EXP ZF*.Z80 >LABELS.LST
  384.  
  385. This would search through all the ZFILER source code (ZF*.Z80) for theì
  386. regular expressions contained in the file LABEL.EXP in directory ASM.  Theì
  387. search would require whole-word matches ('W') and include line numbersì
  388. with the matching lines ('N').  The output would be displayed on theì
  389. screen and written to a new file called LABELS.LST in the currentì
  390. directory.
  391.  
  392.      One final comment.  JetFind does its work at incredible speed. ì
  393. Bridger Mitchell is an absolute master at wringing performance out of theì
  394. operating system, using all kinds of tricks to speed up file operations. ì
  395. Hence the 'Jet' in the name.  JetFind is available from Echelon or Echelonì
  396. dealers for just $49.
  397.  
  398.  
  399.  
  400.                             New ZSIG Programs
  401.                             -----------------
  402.  
  403.      Now I would like to turn to some exciting new ZSIG programs that haveì
  404. been released or are under development at this time.
  405.  
  406.  
  407.                           LLDR -- Library Loader
  408.  
  409.      Paul Pomerleau -- already well known to the community as the authorì
  410. of such widely used programs as VERROR (visual error handler), BALIAS (anì
  411. alias editor), AFIND (alias finder), and the commercial LZED (little Zì
  412. editor) -- has released LLDR, a version of LDR with library support.
  413.  
  414.      This program completely replaces LDR, the standard module loaderì
  415. program used to load new ENV, Z3T, RCP, FCP, NDR, and IOP operating systemì
  416. code segments.  It does everything LDR did but adds one new, veryì
  417. important feature.  It can load the modules from a library.
  418.  
  419.      ENV and Z3T modules in particular are very short (one or twoì
  420. records), and it was very inefficient use of disk and directory space toì
  421. have them sitting around as individual files.  Now all the system filesì
  422. can be collected together in a single LBR file (or several, if youì
  423. prefer).  LLDR's syntax can be expressed in general form as follows:
  424.  
  425.         LLDR [library[.LBR],]<list of modules to load>
  426.  
  427. If the optional library specification is omitted, then it performs justì
  428. like LDR.  If all the system modules are placed in a file called, forì
  429. example, SYS.LBR, then one might invoke LLDR (renamed to LDR) as follows:
  430.  
  431.         LDR SYS,SYS.ENV,DIMVIDEO.Z3T,DEBUG.RCP,SYS.FCP,NUKEY.IOP
  432.  
  433. Besides the saving in file space and directory entries, there is anotherì
  434. nice side benefit of using LLDR in this way -- it is much faster.  Sinceì
  435. only one file (SYS.LBR) has to be opened by the operating system, there isì
  436. only one directory search, and loading the entire collection of modulesì
  437. takes little more time than loading a single one did with the old LDRì
  438. program.  Thanks, Paul, for another nice program.
  439.  
  440.  
  441.                        SALIAS -- Screen Alias Editor
  442.  
  443.      When I released VALIAS (visual alias editor) a couple of years ago, Iì
  444. wrote in the documentation that someone should please extend it to full¡
  445. screen operation (it only supported insertion and deletion of completeì
  446. lines).  Paul Pomerleau's BALIAS allowed full WordStar-like editing ofì
  447. alias scripts, but it treated the entire multiple-command script as aì
  448. single line.  I much preferred the structured presentation of VALIAS, withì
  449. each command on its own line.  I suggested that VALIAS should be extendedì
  450. to automatically indent the lines to show the nesting of flow-controlì
  451. commands.
  452.  
  453.      It has been a long wait, but finally the wait is over.  Rob Friefeld,ì
  454. from the Los Angeles area (contact him on Al Hawley's Z-Node #2), hasì
  455. released SALIAS (screen alias editor), and what a beauty it is.  You willì
  456. no longer find VALIAS on any of my disks!
  457.  
  458.      With SALIAS, alias scripts are displayed and edited rather as if theyì
  459. were WordStar text files.  Each individual command is displayed on its ownì
  460. line, except that long lines can be continued on the next line by enteringì
  461. a line-continuation character (control-p followed by '+') at the beginningì
  462. of the continuation line.
  463.  
  464.      SALIAS works in two basic modes.  One is the command mode, like thatì
  465. in VALIAS.  In command mode, the status line at the bottom of the screenì
  466. displays the following prompt:
  467.  
  468.         CMD (Clear Edit Format Indent Load Mode Print Rename Save
  469.                 Undo eXit)
  470.  
  471. Entering 'C' will clear the script editing area.  'E' will enter full¡
  472. screen editing mode.  'F' will reformat the script, converting it to upperì
  473. case and placing each command on its own line, even if the user enteredì
  474. lines containing multiple commands separated by semicolons.  The 'I'ì
  475. command is similar except that it indents the lines by three extra spacesì
  476. for each level of IF nesting.  Thus a script might appear as follows:
  477.  
  478.         IF EQ $1 //
  479.            OR NU $1
  480.            ECHO SYNTAX IS ...
  481.            ELSE
  482.            IF NU $2
  483.               COMMAND FOR ONE FILE SPEC
  484.               ELSE
  485.               COMMAND FOR TWO FILE SPECS
  486.            FI
  487.         FI
  488.  
  489. This format makes it very easy to see the relationship between the flowì
  490. tests and to detect missing FIs.
  491.  
  492.      Entry of complex conditional aliases is greatly facilitated by theì
  493. use of the tab key to indent the script as it is entered.  The 'I' commandì
  494. will reindent the display according to the actual flow levels, even if theì
  495. user made a mistake.  The spaces (tabs) used to format the display are notì
  496. part of the actual alias script.  However, leading spaces entered by theì
  497. user (to invoke extended command processor operation, for example) will beì
  498. included in the script and are displayed in addition to those added by theì
  499. indenter.  The 'F' command will show the real contents of the script,ì
  500. automatically deleting the indentation tabs.
  501.  
  502.      The 'L'oad command tells SALIAS to clear any existing script and toì
  503. load an alias file for editing.  If such an alias already exists, it willì
  504. be read in.  Otherwise it will be created.  'M' allows one to specifyì
  505. either a normal alias or a VALIAS-style recursive alias, one that clearsì
  506. the entire multiple command line buffer before it is run.  In an earlierì
  507. TCJ column I described how one would use this kind of alias for certainì
  508. kinds of recursion.
  509.  
  510.      The 'P'rint command will send the screen display of the alias scriptì
  511. to the printer.  'R' will let one change the name assigned to the scriptì
  512. being edited so that a script can be read in from one alias and writtenì
  513. out to a new alias.  'S' saves the current script in a file with theì
  514. current name.  Undo will ignore any editing that has been performed on theì
  515. alias and let the user start over with a fresh copy of what was read inì
  516. from the file originally.  'X' will terminate operation of SALIAS (withoutì
  517. any prompting).
  518.  
  519.      SALIAS has an alternative mode of operation entirely from within theì
  520. interactive edit mode.  All of the functions that can be performed byì
  521. commands in command mode, and some others as well, can be performed usingì
  522. control-character sequences directly from edit mode.  These commands areì
  523. as follows.  In all cases, the first character (for example, ^K) is aì
  524. control character.  The second character can be a control character or aì
  525. regular character in either upper or lower case.
  526.  
  527. ^KS   Save the alias under the current file name.
  528.  
  529. ^KD   Done editing -- save the file and then clear the edit buffer.
  530.  
  531. ^KX   Exit from SALIAS after saving the file.
  532.  
  533. ^KN   Assign a new name to the script.
  534.  
  535. ^KQ   Quit without saving the script.
  536.  
  537. ^KR   Read in another alias script and append it to the commands
  538.       currently in the edit buffer.  This is very convenient for combining
  539.       scripts from multiple aliases.
  540.  
  541. ^KF   Reformat the alias, listing each command on its own line, removing
  542.       any flow-control indentation, and converting to upper case.
  543.  
  544. ^KI   Indent the alias display to show flow control nesting.
  545.  
  546. ^KU   Undo changes that have been made to the script.
  547.  
  548. ^KP   Print the script.
  549.  
  550. ^KM   Toggle the mode of the alias between normal and recursive.
  551.  
  552.      The editing commands follow the familiar WordStar pattern.  Even ^QSì
  553. (move to beginning of line), ^QD (move to end of line), and ^QY (delete toì
  554. end of line) are recognized.  The special form ^QZ will zap (clear) theì
  555. entire script so you can start over.  ^R and ^C move to the first and lastì
  556. lines of the script, respectively.  ^QF allows searching for strings, andì
  557. ^QA allows search-and-replace.  ^L will repeat the last search or search¡
  558. and-replace.  ^V toggles between insert and overtype modes.
  559.  
  560.      SALIAS is available in two versions.  The longer version has imbeddedì
  561. help information that can be called up using ^J.  In the shorter version,ì
  562. the help information has been omitted, and ^J instead is used to toggleì
  563. the cursor between the beginning and the end of the current line.
  564.  
  565.      I should mention a few other features of SALIAS.  There is anì
  566. additional status line at the top of the screen.  It shows the name andì
  567. version number of the program, the type of alias (normal or recursive),ì
  568. the number of characters free, and the current name for the alias.
  569.  
  570.      The free-character value is calculated by subtracting the number ofì
  571. characters presently in the script from the number of characters allowedì
  572. in the multiple command line buffer.  This computation is not infallible. ì
  573. There are some parameter expressions, such as $D, that take up less roomì
  574. when expanded, so it is possible that SALIAS will refuse to let you saveì
  575. an alias that it thinks it is too long when in fact it is not.  Moreì
  576. likely, however, is that you will save an alias that has few enoughì
  577. characters for SALIAS to accept it but will become too long when theì
  578. parameters are expanded.  And even if this does not happen, you can runì
  579. into trouble when the alias itself appears in a multiple command lineì
  580. expression, and not-yet-executed commands have to be appended to the aliasì
  581. script.  These subtleties aside, having the display of free characters isì
  582. helpful.
  583.  
  584.      To summarize, in my opinion SALIAS makes all previous alias editorsì
  585. obsolete.  You should be sure to pick it up from your local neighborhoodì
  586. Z-Node.  If you do not have one, then join NAOG/ZSIG and order a disk fromì
  587. them.
  588.  
  589.  
  590.                        VLU -- Visual Library Utility
  591.  
  592.      VLU is a utility we have all been wishing for -- a screen-orientedì
  593. library management utility.  Its author is Michal Carson of Oklahoma City,ì
  594. OK.  I originally suggested a library shell, like ZFILER but working onì
  595. the contents of a library, but Michal pointed out that there is really noì
  596. need for the visual library utility to be a shell, since shell functionsì
  597. like macros performed on pointed-to files will generally not be applicableì
  598. to library members.  So he built VLU as a non-shell utility thatì
  599. interfaces closely with ZFILER.
  600.  
  601.      VLU can be invoked in two ways.  Without any file name specified onì
  602. the command line, it tries to open a library whose name is the same as theì
  603. file name stored in the Z3ENV system file 2.  This system file is whereì
  604. ZFILER keeps the name of the file it is currently pointing to.  If one hasì
  605. a ZFILER macro called, for example, 'V' with the simple script 'VLU',ì
  606. invoking this macro while pointing to a library (or to another file withì
  607. the same name as an LBR file in that directory), the library will beì
  608. opened for work by VLU.  Alternatively, one can specify the name of theì
  609. file on the command line, in which case this name takes precedence overì
  610. any name in system file 2.
  611.  
  612.      Once VLU is running, the display contains two fields.  The upperì
  613. field is like that in ZFILER.  It displays the names of the files in theì
  614. currently logged directory.  The lower field is similar in appearance butì
  615. shows the names of the member files in an open library file.  If noì
  616. library file is currently open, this field is blank.
  617.  
  618.      As in ZFILER, there is a file pointer that can be moved around usingì
  619. standard control characters or, if defined, cursor keys.  In VLU, theì
  620. escape character toggles the cursor between the upper (file) and lowerì
  621. (LBR member) fields of file names.
  622.  
  623.      Many operations can be performed on either set of files.  Files canì
  624. be tagged and untagged, and two wildcard tagging functions are provided. ì
  625. 'GT' group tags all files, while 'W' allows a wildcard file specificationì
  626. to determine which files get tagged.  Individual files or groups of taggedì
  627. files can be viewed, crunched (but not squeezed), or uncompressed (eitherì
  628. uncrunched or unsqueezed, as appropriate).  The 'F' command will show theì
  629. size of an individual file or library member at the cursor.  For libraryì
  630. members, the size is shown in records as well as kilobytes.  Additionally,ì
  631. tagged individual files can be deleted or renamed, and tagged libraryì
  632. members can be extracted, with or without decompression.
  633.  
  634.      The special 'GB' or Group-Build function of VLU allows taggedì
  635. individual files to be built into a new library.  As I write this article,ì
  636. the details of this feature have not been fully worked out, but it will beì
  637. possible for the user to indicate which of the tagged files should beì
  638. crunched according to an automatic algorithm (which will crunch them onlyì
  639. if that results in a smaller file) and which should be put into theì
  640. library in their existing form.
  641.  
  642.      Single individual files will accept the command 'O' to open a libraryì
  643. with that name if it exists and the command 'C' to close the currentlyì
  644. open library.  They can also be renamed using the 'R' command.
  645.  
  646.      There are several miscellaneous commands.  '/' will toggle between aì
  647. built-in help display and the file name display.  'X' is used to exit fromì
  648. VLU; 'J' is used to jump to a file; '*' is used to retag files that wereì
  649. tagged before some group operation was performed; and 'Q' refreshes theì
  650. screen display.
  651.  
  652.      Future versions of VLU will include some features not yet in theì
  653. present one.  A printing capability will be added to complement the 'view'ì
  654. functions.  Presently, VLU cannot add files to an already existingì
  655. library, though it allows the user to specify the number of elements toì
  656. accommodate in the library directory so that another tool such as LPUT canì
  657. be used to add more files later.  VLU has an 'L' command to log into a newì
  658. directory.  By opening a library in one directory and then changing toì
  659. another, one can extract files to a directory other than the oneì
  660. containing the library.  At present, however, the 'L' command does notì
  661. recognize a file mask as ZFILER does to restrict the files included in theì
  662. display.  Even in its initial release form VLU is a very welcome additionì
  663. to the toolbox of Z utilities, and I extend thanks from all of us toì
  664. Michal Carson.
  665.  
  666.  
  667.                            Subject for Next Time
  668.                            ---------------------
  669.  
  670.  
  671.      As I promised last time, this column has taken a less technical tack,ì
  672. though I feel that it has covered important and valuable material.  Forì
  673. next time, however, I expect to return to a more detailed technicalì
  674. discussion.  In the past few weeks, I took up the task of rewriting andì
  675. expanding ZEX, the ZCPR3 in-memory batch execution utility.  This has beenì
  676. my first detailed look at a program of this type -- a resident systemì
  677. extension (RSX), a program that takes over and replaces functions of theì
  678. operating system, in this case the BIOS.  I have learned a great deal andì
  679. have made what I think are some spectacular improvements to the way ZEXì
  680. works and additions to what it can do.  Next time I will share with youì
  681. what I have been doing and what I have learned.
  682.  
  683.