home *** CD-ROM | disk | FTP | other *** search
- FOREVER Z, for Morrow Owners Review
- by Rick Charnes
- 1165 Shotwell St.
- San Francisco, CA 94110
- 826-9448
- approx. 2800 words
-
- Copyright (c) 1987 by Rick Charnes. All rights reserved.
- SUBMISSION DATE: 8/17/87
-
- [This column appeared in two segments: in the October/Novemberáì
- 1987 issue, and then in the final MOR issue before its (*sob*)áì
- demise, December 1987/January 1988.]
-
- áì
- First things first. WordStar 4.0, which will be released by theáì
- áì
- time you read this, has a number of excellent featuresáì
- áì
- specifically tailored for us ZCPR3 users. This reflects theáì
- áì
- superb hand of Dave McCord, Echelon's chief technician andáì
- áì
- creator of the Morrow bootable disk. Dave has been working witháì
- áì
- MicroPro on this and the resulting product is now the most ZCPR3-áì
- áì
- enhanced major CP/M-compatible application program that we have.áì
- áì
- Files can now be referenced either from the command line witháì
- áì
- their named directory reference; i.e., "A0:COMMAND>WSáì
- áì
- LETTER:SYLVIA.LTR". Both the "D" (edit a document) and L)og a newáì
- áì
- directory commands will accept a named directory. The currentlyáì
- áì
- logged named directory is also displayed at the opening menuáì
- áì
- along with the DU: designation, adding a very nice touch.áì
-
-
- WordStar's R)un a program command has had its power greatlyáì
- áì
- increased under ZCPR3. It fixes a major problem that previouslyáì
- áì
- existed for us, viz. it could not previously run a non-COM-fileáì
- áì
- alias. This of course means ARUNZ/ALIAS.CMD entries, which is theáì
- áì
- main way we are making aliases. Since such a large part of ouráì
- áì
- work from the command line consists of referencing ALIAS.CMDáì
- áì
- aliases, WordStar can now be used very much like a one-time ZCPR3áì
- áì
- shell. Additionally, we can now run any resident commands such asáì
- áì
- REN, SAVE, ERA, etc. from the R) command. Note that this onlyáì
- áì
- works for ZCPR3 users; CP/M users (poor souls) cannot runáì
- áì
- resident commands and are still limited to executing .COM files.áì
-
-
- Finally, if you never got the hang of ZRDOS' public directoryáì
- áì
- feature (shame on you!), WordStar will now search along ZCPR3áì
- áì
- path for its overlay files, a very nice touch that rounds off theáì
- áì
- superb work MicroPro has done towards "Z-ifying" this excellentáì
- áì
- product.áì
-
-
- I'd like now to describe two of the most innovative of the newáì
- áì
- programs hot off the ZCPR3 presses and available from Z-Nodeáì
- áì
- BBSes everywhere.áì
-
-
- The brilliantly unorthodox nature of the programming work done byáì
- áì
- Mr. Dreas Nielsen of Corvallis, Oregon has always impressed meáì
- áì
- profoundly. He works in a realm more or less neglected by otheráì
- áì
- programmers, dealing with what might be called [START BOLD]non-áì
- áì
- menu[END BOLD] shells and shell variables. Some of you may haveáì
- áì
- experimented with his exotic and brilliant QUEUE.LBR which heáì
- áì
- wrote in the very earliest days of ZCPR3 when even [STARTáì
- áì
- UNDERLINE]ZCPR3: The Manual[END UNDERLINE] was unavailable. Itáì
- áì
- was an extraordinarily sophisticated technique that would placeáì
- áì
- filenames in a "queue" to be executed one by one by a user-áì
- áì
- specified command or series of commands. The utilities he usedáì
- áì
- when he wrote this 2 1/2 years ago -- SH, SHSET, SHVAR, SHDEFINEáì
- áì
- -- remain even today unappreciated and unused by the vastáì
- áì
- majority of ZCPR3 computerists.áì
-
-
- Following these chronologically in Mr. Nielsen's pantheon was theáì
- áì
- release of his superb GETVAR/RESOLVE duo, with which one is ableáì
- áì
- to store (GETVAR) and then reference (RESOLVE) a named variableáì
- áì
- based on user input given in response to program query. I hope toáì
- áì
- be able to go into these important programs in a future column.áì
-
- áì
-
- More recently he has done superb work in enhancing SH.COM andáì
- áì
- SHVAR.COM, two of the early ZCPR3 non-menu shells. And finally,áì
- áì
- as his crowning glory, Mr. Nielsen has now graced us with hisáì
- áì
- elegant FOR/NEXT/PERFORM series, contained within the libraryáì
- áì
- FORNXT2.LBR. These programs give the 8-bit world something whicháì
- áì
- we have never previously had, "FOR/NEXT" looping [START BOLD]fromáì
- áì
- the command line[END BOLD]. Those programmers among you willáì
- áì
- understand the significance of this particular form of syntax. Itáì
- áì
- is actually a refinement and culmination of the basic conceptáì
- áì
- Dreas started in 1985 with QUEUE.LBR. As the ZCPR3 world hasáì
- áì
- progressed and more sophisticated tools have become available,áì
- áì
- programmers such as Mr. Nielsen have been able to use these toolsáì
- áì
- as building blocks from which they may go on and create even moreáì
- áì
- elegant concepts, and FORNXT2.LBR is his gift to us.áì
-
-
- The purpose of these programs is to generate a list ofáì
- áì
- "arguments" upon which any number of possibly unrelated commandsáì
- áì
- are then executed (PERFORMed). In one of its simplestáì
- áì
- applications, the arguments would be a list of filenames.áì
- áì
- Suppose, for example, you're writing a book and today is the dayáì
- áì
- to put the finishing touches on your last four chapters, each ofáì
- áì
- which exists as a separate file on your disk. For each (usingáì
- áì
- FOR.COM, get it?) of these files, you want to edit it witháì
- áì
- NewWord and then run it through both CORRECT-IT and GMK.COMáì
- áì
- ("Grammatik", checks for grammar, style, punctuation, etc.).áì
- áì
- Since your editor is one of those unlucky persons with one ofáì
- áì
- those obsolete IBM PC's, you have to run them through FILTW.COMáì
- áì
- to strip out all non-ASCII codes. Then finally before you turnáì
- áì
- your computer off for the night you want to archive each file toáì
- áì
- your backup floppy. This is all a fairly ordinary flow ofáì
- áì
- procedures for many writers.áì
-
- áì
-
- But it sounds like a great deal of repetitive keyboard work, aáì
- áì
- lot of the same commands to remember for each file, right? OK,áì
- áì
- let's put our ZCPR3 thinking caps on. We're smart and we know weáì
- áì
- could write an alias including all of the above commands. Butáì
- áì
- that would still entail running the alias four times, once foráì
- áì
- each file. We are really enraptured by the Muse today and don'táì
- áì
- want to be bothered by all that computer-izing. Well, if all theáì
- áì
- files have a similar name, such as CHAPTER.016, CHAPTER.017, etc.áì
- áì
- we'd know what program would take care of this: Steve Cohen'sáì
- áì
- W.COM. Standing for W)ildcard, W.COM gives programs acceptingáì
- áì
- only unambiguous parameters the ability to accept themáì
- áì
- wildcarded. We'd simply write our alias, called say, WRITE, enteráì
- áì
- "W WRITE CHAPTER.*", and off we'd go.áì
-
-
- But suppose the chapters of our autobiography are named, foráì
- áì
- instance, after the various cities in which we've lived, and theáì
- áì
- filenames are therefore unrelated? Try this on for size, and getáì
- áì
- a sample of FOR/PERFORM:áì
-
-
- FOR CHERHIL BOSTON GLOCSTER FRISCOáì
- PERFORM ECHO PROCESSING $X...$|NW $X$|CORRECT $X$|GMK $X$| <<áì
- FILTW $X$|AC $X BACKUP: /Aáì
-
-
- Quite a mouthful, but this command line could easily take usáì
- áì
- through the entire day's computing. We're all running HSH, ofáì
- áì
- course, the command line editor, so any mistakes in entering areáì
- áì
- easy to correct. Let's go through it slowly.áì
-
-
- The initial 'FOR' line creates the list of "arguments," in thisáì
- áì
- case filenames (could be entire command lines!), and places themáì
- áì
- into a file called FORFILES.SYS that is automatically created byáì
- áì
- FOR.COM. This is a "system" file (has its $SYS attribute turnedáì
- áì
- on) so a directory display will not ordinarily show it, butáì
- áì
- that's fine with us. We could if we wished look into FORFILES.SYSáì
- áì
- with an editor and we would see a text file consisting simply ofáì
- áì
- the four files we entered as parameters.áì
-
-
- Now for PERFORM. PERFORM.COM reads the list contained withináì
- áì
- FORFILES.SYS and in our case substitutes each file, one by one,áì
- áì
- into the parameter symbol'$X' in its own command line. It's veryáì
- áì
- similar to the usual parameter symbols '$1', '$2', etc. usedáì
- áì
- elsewhere. If you look closely, however, you'll see an odd-áì
- áì
- looking symbol, '$|'. The symbol is a "substitute multiple-áì
- áì
- command separator." It is PERFORM.COM's substitute for theáì
- áì
- normal ZCPR3 semicolon (';') used for separating commands in theáì
- áì
- ZCPR3 multiple command line buffer. Remember: we're not at the ì
- áì
- system level; we're still working inside an application andáì
- áì
- applications have their own rules and symbols. It may look likeáì
- áì
- we are stringing together a series of separate commands for theáì
- áì
- regular ZCPR3 command line buffer, but appearances are deceiving.áì
- áì
- Everything on that command line is really simply parameters foráì
- áì
- PERFORM.COM.áì
-
-
- We therefore need some way of telling PERFORM that it shouldáì
- áì
- consider all our seemingly separate commands as input for it toáì
- áì
- process. We do this with the '$|' symbol. In the above line whenáì
- áì
- you see a '$|' flush right against a '$x', keep in mind that theyáì
- áì
- are really not together; the former symbol is simply acting toáì
- áì
- separate what precedes it from what follows it. When PERFORM doesáì
- áì
- its marvelous work of substituting each of the files ináì
- áì
- FORFILES.SYS one at a time wherever it sees the '$x' symbol, itáì
- áì
- also will translate each '$|' into a semicolon. Each time itáì
- áì
- loops through our entire sequence of commands, it does the twoáì
- áì
- substitutions -- a filename for '$x' and a ';' for '$|'. It THENáì
- áì
- sends this "resolved" command line over to the command processoráì
- áì
- proper and runs it.áì
-
-
- All this activity is said to take place on the "shell stack" andáì
- áì
- '$x' is then called a "shell variable." PERFORM.COM placesáì
- áì
- itself on this shell stack, just as do our more familiar "menu"-áì
- áì
- based shell utilities, VFILER, VMENU, and MENU. One easy way toáì
- áì
- see this visually is by simply adding the command 'SHOW' anywhereáì
- áì
- in the above line. When SHOW.COM loads choose the "S" option andáì
- áì
- you will be given a "real-time" view of what the shell stackáì
- áì
- looks like.áì
-
-
- So now we're beginning to see what will happen. On the first loopáì
- áì
- through, our command line will have resolved to:áì
-
-
- ECHO PROCESSING CHERHIL...;NW CHERHIL;CORRECT CHERHIL; <<áì
- GMK CHERHIL;FILTW CHERHIL;AC CHERHIL BACKUP: /Aáì
-
-
- This command line in itself will keep us busy for quite a while,áì
- áì
- but of course when it finishes it will move us automatically onáì
- áì
- to BOSTON and the rest, repeating the entire series. We may spendáì
- áì
- two or three hours inside of NewWord working on each file. Alláì
- áì
- the while the above command sequence is sitting patiently in theáì
- áì
- command line buffer, waiting for us to exit. When we do, it isáì
- áì
- immediately ready and available to go to work for us with theáì
- áì
- next command.áì
-
-
- This is really a very simple use of these tools, nor does it evenáì
- áì
- require NEXT.COM. FOR can create a list not just of files but ofáì
- áì
- all user areas, named directories, command lines, or simplyáì
- áì
- integers up to a user-specified limit, all capable of being actedáì
- áì
- upon by PERFORM. This combination provides a very powerfuláì
- áì
- command structure with which we can greatly automate many of ouráì
- áì
- operations, and I am very grateful to Mr. Nielsen for hisáì
- áì
- bountiful work.áì
-
-
- While we're exploring the command line buffer this is a good timeáì
- áì
- to make a quick digression into explaining it as one of theáì
- áì
- fundamental differences between ZCPR3 and CP/M. When a warm bootáì
- áì
- occurs in either CP/M or ZCPR3 a fresh and virgin copy of theáì
- áì
- command processor is loaded from disk. The significance of thisáì
- áì
- is as follows: in CP/M the command line resides directly in theáì
- áì
- command processor. When a warm boot takes place, such as when aáì
- áì
- program exits, this therefore flushes (wipes out) the commandáì
- áì
- line. This is why CP/M 2.2 cannot support multiple commands. Witháì
- áì
- ZCPR2 and ZCPR3 the command line was [START BOLD]removed[ENDáì
- áì
- BOLD] from its location in the command processor and placed in aáì
- áì
- specially protected area of memory known as a buffer. This wayáì
- áì
- the command line can maintain its integrity across warm boots andáì
- áì
- return as we like to do our bidding.áì
-
-
- I'd also like here to pass on a tip that I have found veryáì
- áì
- helpful in a number of circumstances in which I need to debug aáì
- áì
- command script I have written. It's ideal for aliases insideáì
- áì
- ALIAS.CMD, macro scripts in VFILER.CMD, MENU.VMN, etc. and asáì
- áì
- well with our PERFORM command line in case something had goneáì
- áì
- wrong. What we do is load the ZCPR3 program MU3 (Memory Utility)áì
- áì
- prior to anything else on the line. Once MU3 loads, we can thenáì
- áì
- scan to the aforementioned special area in memory (the commandáì
- áì
- line buffer) where our command line is kept, and simply view it.áì
- áì
- The beauty of this technique is that even though MU3 is the firstáì
- áì
- command in the line, the command line will have already beenáì
- áì
- built/generated by the time MU3 loads, and all the rest ofáì
- áì
- commands have already been placed in the buffer and we are ableáì
- áì
- to see the finished product. We see exactly what the commandáì
- áì
- processor sees and therefore our job of debugging is made mostáì
- áì
- easy.áì
-
-
- In our customized Morrow Z-System configurations the MCLBáì
- áì
- (multiple command line buffer) is precisely at location FF04 ináì
- áì
- memory. So we precede our line with 'MU3 FF04' where 'FF04' is aáì
- áì
- parameter to MU3, and this takes us directly to where we wish toáì
- áì
- go. In aliases it should be placed as the very first item. In theáì
- áì
- above example and any example with shell variables, however, weáì
- áì
- want to see the buffer [START BOLD]after[END BOLD] PERFORM oráì
- áì
- whatever shell processor we are using has substituted itsáì
- áì
- variables and transformed '$|' into ';', so we put it as the veryáì
- áì
- first item in PERFORM's command line:áì
-
-
- PERFORM MU3 FF04$|ECHO PROCESSING $X....áì
-
-
- Note that positioned thusly PERFORM processes MU3 as one of itsáì
- áì
- parameters, even though it's not a variable. The use of theáì
- áì
- command line separator '$|' ensures that it resolves all commandáì
- áì
- line parameters in one pass, so MU3 is "resolved" along with theáì
- áì
- variables and we are allowed to peek into the fully expandedáì
- áì
- command line. The use of MU3 as a debugging tool has tremendousáì
- áì
- general applicability; in most circumstances we needn't concernáì
- áì
- ourselves with the above matters.áì
-
- áì
-
- More new programs: Jay Sage, the author of ZCPR33, has developedáì
- áì
- ZFILER v.10f, a Z33-enhanced version of VFILER, our general dailyáì
- áì
- interface with the command processor, that allows for "groupáì
- áì
- macros." Until now we were limited to running our scripts on aáì
- áì
- single pointer file. With ZFILER10F we have the capacity to run aáì
- áì
- macro script on all tagged files. This is a tremendousáì
- áì
- enhancement and opens up all sorts of possibilities. ZFILERáì
- áì
- scripts are 95% compatible with your VFILER.CMD scripts with oneáì
- áì
- major change: the '$' is used instead of '%' for the pointer fileáì
- áì
- parameters.áì
-
-
- Just to whet your appetite: suppose, for instance, you want toáì
- áì
- insert 6 different files on your disk into a single, alreadyáì
- áì
- existing library. You write an easy macro in your VFILER.CMD;áì
- áì
- let's call it "I" for "Insert":áì
-
-
- I nulu -O $"Name of library file ([DIR:]LIBNAME): " <<áì
- -a $f -x;era $fáì
-
-
- For those who haven't yet discovered V/ZFILER's [STARTáì
- áì
- BOLD]$"[END BOLD] symbol, it requests user input before anythingáì
- áì
- else runs in the script. It then inserts the user's response intoáì
- áì
- the final, expanded command line precisely at the locationáì
- áì
- between the $" and the terminating " (double-quote mark). Whenáì
- áì
- this script runs the very first thing that happens is that we areáì
- áì
- queried for the name of the LBR. We respond, hit <CR> and theáì
- áì
- pointer file, represented by '$f', is inserted into the LBR.áì
-
-
- As an example let's say we are pointing to LETTER.TXT and we wantáì
- áì
- to insert it inside CORRESPO.LBR. We hit our macro lead-in keyáì
- áì
- (default is <ESC>) and then "I." The stringáì
-
-
- Name of library ([DIR:]LIBNAME):áì
-
-
- appears on the screen. We answer "CORRESPO" and the followingáì
- áì
- command line is generated:áì
-
- áì
-
- NULU -O CORRESPO -A LETTER.TXT -X;ERA LETTER.TXTáì
-
-
- NULU can accept all this on its command line, so it worksáì
- áì
- beautifully.áì
-
-
- But, you ask, do you have to repeat the process six times foráì
- áì
- each of your files? With VFILER you do; with ZFILER you don't.áì
- áì
- Simply tag all your files, run the new "group macro" command, hitáì
- áì
- "I" again, and stand back and watch while one by one six commandáì
- áì
- lines are generated and each file is inserted into CORRESPO.LBR.áì
-
-
- There's more: Jay, in his usual brilliance, has thought ofáì
- áì
- everything. The above technique is slowed considerably by timeáì
- áì
- spent loading and re-loading NULU six times from disk. For thoseáì
- áì
- wanting to experiment with the resident GO command here is youráì
- áì
- opportunity. By preceding a command script with the symbol '$!'áì
- áì
- GO is substituted for the command verb (here 'NULU') on every runáì
- áì
- but the first. GO of course runs whatever is in TPA memoryáì
- áì
- without having to pull it off the disk, so its speed isáì
- áì
- astonishing. The technique works flawlessly and is breathtakingáì
- áì
- to watch.áì
-
-
- The latest on the Z280 front: I've had considerable contact witháì
- áì
- Zedux, Inc., the southern California manufacturer of the genericáì
- áì
- Z280 add-on board that I mentioned last time. They do in factáì
- áì
- have a ready-to-run multi-tasking operating system called RPáì
- áì
- (Remote Partition) for their Accel 280, and I have arranged foráì
- áì
- them to come to San Francisco in mid-September to demonstrateáì
- áì
- their wares. They are urging attendees to bring whatever Z80áì
- áì
- computers they use, and they promise to walk around the room andáì
- áì
- plug a board into the different machines so as many folks asáì
- áì
- possible can get the experience of a multi-tasking operatingáì
- áì
- system running on their own computer. Promises to be quite aáì
- áì
- night.áì
-
-
- Hope y'all are having fun. Z you next time...áì
-