home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
ZCPR33
/
S-Z
/
ZCOLUMNS.LBR
/
FOREVERZ.4Z7
/
FOREVERZ.487
Wrap
Text File
|
2000-06-30
|
14KB
|
255 lines
FOREVER Z
Z-SYSTEM column #2 appearing in Morrow Owners Review,
April/May 1987
(c) 1987 Rick Charnes, all rights reserved
by Rick Charnes
By now many of you are well on the way toward creatingáì
elegant command scripts for your menus and exploring the manyáì
ways to make beautiful screen displays. The menu utilitiesáì
(VFILER, VMENU, MENU) are interesting: while many of us wereáì
running CP/M we denigrated programs that relied heavily on menus.áì
"Menus are for beginners!" we insisted. But in Z-System the moreáì
you use them the more you see how helpful they are, how much timeáì
and energy they save in doing repetitious tasks. The differenceáì
between CP/M programs that display menus and Z-System menus youáì
create yourself is the latter's ability to run detailed 200-áì
character command lines at the touch of a key. Most CP/M menusáì
execute but a single command in this manner.
In this regard I think I didn't stress enough in my lastáì
column the importance of getting a copy of Echelon's DEMO.LBR asáì
the very first step towards exploring Z-System's menuáì
possibilities. I recommend this as the first thing a newcomer toáì
our operating system do. I remember that fateful day when Iáì
finally had Z-System installed for the first time. I sat back,áì
looked at what I had done, and thought, "OK, now - what do I do?" áì
The suggestion was made to me that I take a look at DEMO.LBR. áì
This library started me on my way and it's been a trusty guideáì
ever since. So many of my menus now, 9 months later, are derivedáì
ultimately from those in this extraordinary file. It comesáì
complete with 10-page documentation (you print it out yourself),áì
and is the perfect introduction to 1) seeing the beauty andáì
extraordinary utility of menus, and 2) learning how easy andáì
enjoyable it is to create your own, using those provided here asáì
your model. Be sure to pick up a copy from the bulletin boardáì
nearest you, or direct from Echelon.
I would like to mention a few other sources of Z-Systemáì
information that I have found immeasurably helpful in my ownáì
education. First and foremost are products from Echelon, Inc. atáì
885 N. San Antonio Road, Los Altos, CA 94022. I urge all usersáì
of Z to subscribe to their stylish and lively fortnightly Z-Newsáì
containing much information about new CP/M-compatible hardwareáì
(and don't think it doesn't exist!), Z-System tips, announcementsáì
and discussion of new programs, letters from readers,áì
philosophical ruminations, etc. It's the essential way to keepáì
up with the latest developments in our Z-System world. Iáì
recommend it to every user without exception. Echelon's newáì
catalog is also out, which discusses each of their products fromáì
a personalized point of view. It's beautifully done and presentsáì
Z-System from a broad historical perspective. Lastly, theáì
invaluable accompaniment to the Z-System User's Guide which mostáì
of you have is ZCPR3: The Manual, available from MOR for $20. áì
This is a reference manual rather than a guide, and describesáì
each utility in painstaking detail, picking up where The User'sáì
Guide leaves off.
Now to HSH.COM, the amazing command recall and editingáì
program. "HSH.COM" stands for "History SHell," and that'sáì
exactly what it is. It remembers the "history" of all theáì
commands you've entered and stores them in a file. It's aáì
"shell" because it envelopes all your other operations, remainingáì
in the background until you need it, with no functional reductionáì
in TPA. Who among us has never typed a line such as: "NWáì
LOBELTR.TXT" only to realize that the "B" was supposed to haveáì
been a "V"? In CP/M all the letters after the "B" are lost. Youáì
have no choice but to backspace and erase until you get to theáì
"B", this time enter "V", and retype the rest. If, however, ináì
your STARTUP alias you loaded HSH, you can cursor to the leftáì
with ^S or ^A to move to the offending letter, delete it with ^Gáì
and replace it with "V", and return. This feature is especiallyáì
valuable in Z-System where we are allowed command lines of up toáì
200 characters in both a menu script and directly from theáì
command line.
This isn't the half of it. I've found its most usefuláì
feature to be command line recall. When we are doing work fromáì
the command line that entails frequent repetition of filenamesáì
and commands, we are able to "recall" previously issued commands. áì
They can then either be reissued as is or edited and then run. áì
The author has kindly relied on the Wordstar/Newword cursoráì
movement commands with which we're familiar. To recall aáì
previous command we type ^E until we get to the command weáì
desire. To move forward in our command "history" we type ^X. áì
When we find the command we want, <CR> will send it to theáì
operating system, or we can edit it and send it out again.
I keep HSH in operation at all times. It is available onáì
our MOR BBS (415/654-3798) or Z-Nodes everywhere free of charge,áì
courtesy of its author Michael Rubenstein. It is a brilliantáì
piece of work and adds an additional level of elegance to ouráì
computing.
Another superb program which I wanted to cover, justáì
released in 1987, is ZPATCH. This is a patching utility thatáì
leaves ZAP, the program many of us previously used, in the dust.áì
It is also a shell, which has a special meaning in this context. áì
Remember, a shell sets itself up below your normal operations. áì
Any time you choose to exit another program, you are alwaysáì
returned to the shell. Because of this feature ZPATCH has aáì
power and flexibility that no comparable CP/M program such as ZAPáì
or EDFILE can match.
Suppose you have found a certain patch you want to make toáì
VFILER.COM, for instance to allow for immediate execution ofáì
macros 0-9 without hitting the "macro" lead-in character. Youáì
know the patch address for this byte is 011Ah. From the Z-Systemáì
command line enter "ZPATCH VFILER". Once you are inside ZPATCHáì
the actual commands for patching are very similar to any of theáì
CP/M programs such as the two mentioned above. But here's theáì
rub. Once you have made the patch and saved to disk, hit "X" toáì
eXecute. Voila! The program VFILER is automatically run, witháì
your new values in effect. You can of course test it now to makeáì
sure the changes you have made work as you wish. Now: when youáì
are finished testing, exit VFILER the way you would normally. áì
ZPATCH once again takes over. You see its "strike any key"áì
message and when you do so you find yourself back in ZPATCH. Ifáì
you wish to correct the changes you made the first time or toáì
patch new locations you may do so all without leaving thisáì
wonderful shell we have created. You can loop back and fortháì
between patching and running as many times as you like until youáì
have your program exactly as you like it. No commands need beáì
typed on your part; the entire routine is held "on the shelláì
stack" and is taken care of by the operating system. This useráì
as opposed to programmer use of the shell stack is one of theáì
superior elements of Z-System over CP/M.
But that's not the end of ZPATCH's shell nature. Suppose ináì
the middle of patching you realize you're not sure of the rightáì
addresses to change. You remember they're all explained in theáì
HELP file for VFILER, VFILER.HLP. But what a shame it would beáì
to have to leave ZPATCH. Simply hit "Z". This will return youáì
to the Z-System command line but still from within the ZPATCHáì
shell (a similar feature is available by typing "Z" in VFILER asáì
well.) You may then enter "HELP VFILER" (or any other Z-Systemáì
command line) as if you were at your regular operating systemáì
prompt. HELP.COM will load your help file; you may read it, noteáì
the patching address, and exit. Here, rather than returning toáì
your Z-System command line as you would normally, you will beáì
presented with ZPATCH's familiar "strike any key." You do so andáì
you're immediately back to the precise location and screen ináì
ZPATCH from which you left off.
ZPATCH is quite an extraordinary program and is availableáì
through all the usual channels. By the way, for keeping up witháì
the latest programs I must emphasize here the importance ofáì
having and using a modem for any serious work in Z-System.
I'd like to delve into a topic which is covered only in theáì
most cursory manner in the Z-System User's Guide, Extendedáì
Command Processing (ECP), which is especially important on floppyáì
disk systems. This feature has no parallel in CP/M. Suppose youáì
issue a command "COPY LETTER1 C:LETTER2" while logged on to B0:. áì
In CP/M, if you have no program called COPY.COM that's the end ofáì
it. But not in Z-System; this is where the ECP comes into play. áì
The ECP then looks for a file called CMDRUN.COM. This file canáì
be any executable program, renamed to CMDRUN.COM. Whatever thisáì
file may be it then is executed. Most people use a programáì
called ARUNZ.COM. ARUNZ stands for Alias RUN Z-System (run anáì
alias) and is a real star in our repertoire. It provides us aáì
way to put all our aliases into a single supplementary file whicháì
we create, called ALIAS.CMD.
What is the advantage of this? On a floppy disk system aáì
single alias existing as its own COM file occupies a minimum ofáì
2k in disk space and 4k on a hard disk. This is an inefficientáì
use of space considering that the maximum length of an alias isáì
200 characters. With your word processor you create a file whicháì
you name ALIAS.CMD. Into this file you then put as many aliasesáì
as you like, each horizontal entry representing one alias. Eacháì
should occupy one physical line only and the individual commandsáì
within an alias must be separated by semicolons, just as within aáì
menu command script. The lines themselves may extend to a rightáì
margin of 200, and should begin with the name of the alias.
Suppose you wanted to put the COPY alias that I describedáì
last time into your ALIAS.CMD rather than as a "free-standing"áì
COM file taking up disk space. Your entry in ALIAS.CMD wouldáì
read:
COPY CP $1=$2
Then when you issued your command "COPY LETTER1 C:LETTER2" youráì
CCP would first look for a regular program named COPY.COM and notáì
finding one would surrender control to the ECP which is hereáì
ARUNZ.COM. It in turn then passes control, complete with youráì
parameters, to its auxiliary file ALIAS.CMD, and finding youráì
entry will successfully execute the copy. This entire processáì
takes place very quickly, occupying just a very slight amount ofáì
time greater than it would with a single program called COPY.COM.
The possibilities are endless. You can put as many of youráì
aliases as you wish into your ALIAS.CMD and save an amazingáì
amount of space, especially crucial on a floppy disk. A niceáì
variation would be:
COPY ECHO COPYING FILE "$1" TO "2"...;CP $1=$2
to give yourself some friendly "status reporting."
Don't forget about our memory-resident flow control, alwaysáì
crucial with aliases and menu scripts. Remember how "if", "else"áì
and "fi" (endif) work together. The following is typical:
IF condition x exists
(do such and such command)
ELSE ;or else if condition x does NOT exist
(do such and such OTHER command)
FI ;it must be terminated in this manner
A good example here, building on our alias above, would beáì
to first check to see if our file existed at all. This is done ì
with the EXIST option of IF (a resident command). The followingáì
would be our ALIAS.CMD entry:
COPY IF EXIST $1;ECHO COPYING FILE "$1" TO $2...;CP $2=$1; >>
ELSE;ECHO FILE "$1" DOES NOT EXIST
Each entry is separated by semicolons. If the file does notáì
exist, we are told so by means of an ECHO'ed message.
In closing, I must mention something in our Morrow Z-Systemáì
world that is most exciting. Many of you have been hearing aboutáì
the new Hitachi HD64180 chip, an 8-bit CP/M compatibleáì
microprocessor capable of addressing 512k bytes of memory. Alláì
our familiar CP/M and Z-System programs can run on this chip atáì
approximately twice the speed. Several machines are now beingáì
manufactured that use this chip such as the Micromint SB180 andáì
the Deep Thought DT42. We in the Morrow community may soon haveáì
the opportunity to install an HD64180 to our existing computer byáì
means of an add-on board made by a company called M.A.N. Systems. áì
An operating system capable of multi-tasking and taking fulláì
advantage of the 64180 is still under development at Echelon, butáì
until then we would be able to use the extra memory primarily asáì
a RAMdisk.
There is one hitch, however: M.A.N. Systems has requestedáì
that we do the necessary revisions to the Morrow BIOS. We areáì
looking for assembly language programmers willing to tackle theáì
task. Interested parties should contact me through the MORáì
office.
Lastly, don't forget the Morrow auto-install Z-System diskáì
packages are now available and shipping from MOR in both floppyáì
and hard disk versions, as well as the group discount for theáì
Mini-Winie hard disk. Running Z-System on a hard disk is a sightáì
to behold... By the way, with purchases of these disks MOR is nowáì
including my home phone number as a reference, and please feeláì
free to call if you have any questions.
Learn, experiment, and be amazed. Z see you next time...