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 / JSAGE / ZSUS / TCJ / TCJ30.WS < prev    next >
Text File  |  2000-06-30  |  38KB  |  681 lines

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