home *** CD-ROM | disk | FTP | other *** search
-
- Z AT Last! Z AT Last! Thank Cran And Others! Z AT Last!
- (A Primer On Using Z-System Software On AT-Class Machines Under MYZ80)
-
- Copyright (C) 1992 By Lee Bradley
-
- 0. In The Beginning ..
-
- On August 1, 1992, Simeon Cran brought forth MYZ80100.ZIP, a 58k
- package which lets AT-class machines run Z80-class software. Not only does
- Cran's emulator run CP/M programs, but it also runs Z-System programs. As
- CP/M machines die and IBM machines get produced, this development comes as
- exciting news to those who have remained active in the 8-bit community.
-
- Few AT-class machine owners are aware of the advancements that have
- taken place in 8-bit operating systems over the last ten years. Now that
- these advancements are available to them, I think a short article which
- talks about how to get the software and how to use it, has a place.
-
- 1. What You Need And How To Get It
-
- As of this writing (August 21, 1992,) the first thing you need is the
- file MYZ80100.ZIP. You may send for it directly by writing the author.
- MYZ80 is user-supported software and Simeon Cran will send you the latest
- version of his emulator and listen to your questions. The registration fee
- is $30 Australian ($23.50 US) and the address is:
-
- MYZ80 Registration, Software by Simeon
- 2 Maytone Ave, Killara N.S.W.
- AUSTRALIA 2071
-
- MYZ80100.ZIP is available for download from electronic bulletin
- boards. I run such a board in Connecticut, Z-Node #12, (203) 665-1100. If
- you don't care or are not equipped to download, a 720k 3.5" disk with
- MYZ80100.ZIP *plus* the 20 or so files discussed below may be obtained by
- sending a $10 check to:
-
- Small Computer Support, 24 East Cedar Street, Newington, CT 06111
-
- I strongly encourage you to register your copy with the author.
-
- The second thing you need is the NZCOM package, an automatic, dynamic,
- universal Z-System, a CP/M 2.2 compatible operating system. To order it,
- send a check for $49 plus $3 S&H to:
-
- Sage Microsystems East, 1435 Centre Street, Newton Centre, MA 02159-2469
-
- 2. Getting Started With MYZ80
-
- Since MYZ80 is provided in .ZIP form, you'll need to unZIP it. For
- this you'll need PKUNZIP.EXE. Place the disk with MYZ80100.ZIP in your
- drive and copy it to a subdirectory of your hard disk. Say you've created a
- subdirectory via
-
- C:\> md myz80
-
- Then, copy the .ZIP file to this subdirectory via
-
- C:\> copy a:myz80100.zip \myz80
-
- Next, change directories and unZIP the file via
-
- C:\> cd myz80
- C:\MYZ80> pkunzip myz80100
-
- At this point, you should have 6 or so files in the subdirectory. One of
- them is CPM.EXE. Run it via
-
- C:\MYZ80> cpm
-
- If you are running an unregistered copy of the software, you will be
- presented with several screens of information. By hitting return you will
- eventually get the "A prompt."
-
- A0>
-
- Type DIR at this prompt to get a directory of the files on the "A disk."
-
- A0> dir
-
- Among the files, the following will appear: DOSDIR.COM, EXPORT.COM,
- IMPORT.COM and QUIT.COM. There will be others, but the four listed above
- are the most important ones. DOSDIR lets you get a directory of the
- subdirectory from which you invoked the emulator.
-
- A0> dosdir
-
- should show you something like the following:
-
- myz80100.zip|cpm.exe |a.dsk |boot.cpm
- myz80.doc |read.1st | |
-
- IMPORT lets you copy files from the hard disk to your "A disk." EXPORT goes
- the other way. QUIT gets you out of the emulator and back to MSDOS (or
- DRDOS etc.) The file named A.DSK holds the files you see when you issue the
- CP/M DIR command. As you IMPORT, this file grows in size.
-
- MYZ80 supports three 8 megabyte "partitions," "drives A, B and C," and
- a RAM disk, "drive D." You log into these drives as follows:
-
- A0> b:
- B0> c:
- C0>
-
- You may also log into drive A, "user area 1," via the CP/M USER resident
- command:
-
- C0> user 1
- C1> a:
- A1>
-
- Simeon put files in user area 0 and user area 1 of drive A.
-
- A1> dir
-
- should show you a few files. One of them is MYZ80.Z3T. This file is a
- "terminal capabilities" segment and will be used to provide hilighting,
- clear screen, cursor positioning etc. functions when we bring up Z-System.
-
- 3. Getting Started With Z-System
-
- The key files you need to get Z-System going are MKZCM.COM, NZCOM.LBR
- and NZCOM.COM. These files of course are part of the NZCOM package
- mentioned above. NZCOM (ie. Z-System for CP/M 2.2 computers) may be
- purchased from Sage Microsystems East (address above.)
-
- Copy these files from your distribution disk to the MYZ80
- subdirectory. If you are running the emulator, leave it and get back to
- MSDOS (DRDOS etc.) via
-
- A0> quit
- C:\MYZ80>
-
- Now, do the copy.
-
- C:\MYZ80> copy a:mkzcm.com
- C:\MYZ80> copy a:nzcom.lbr
- C:\MYZ80> copy a:nzcom.com
-
- Next, run the emulator and bring these files into your "A disk" with
- IMPORT.
-
- C:\MYZ80> cpm
- A0> import mkzcm.com
- A0> import nzcom.lbr
- A0> import nzcom.com
-
- Next, run MKZCM, which allows you to define which "system segments" you
- want and how big they are going to be.
-
- A0> mkzcm
-
- The "system segment" called the "resident command processor" defaults to
- one which is 16 records (2k) big. Since the stock "resident command
- processor" in NZCOM.LBR is 18 records long, select option 5 from the MKZCM
- menu and then enter 18 for the new size. To save the results, type S and
- when asked what name to use for the "environment" files which will get
- created, type NZCOM. Do not be concerned at this point about exactly what
- is going on. MKZCM provides many choices. Our objective here is to get you
- up and running, not to explain the details and possibilities.
-
- Run NZCOM (the Z-System segment loader) by typing:
-
- A0> nzcom
-
- You will see a series of messages as NZCOM accesses NZCOM.LBR and loads
- segments into the Z-System environment. The last thing you should see is
- actually an error message, namely
-
- STARTZCM?
-
- followed by a new "A prompt"
-
- A0:COMMANDS>
-
- 4. Bringing Up The Key Z-System Tools
-
- To take full advantage of this new operating system environment,
- you'll need some basic tools. As we discuss each recommended tool, the
- power and flexibility of Z-System will become apparent. The files that come
- to mind *first* are:
-
- 1. MYZ80.Z3T - a terminal capabilities file
- 2. SALIAS.COM - a screen-oriented "real" alias editor
- 3. ARUNZ.COM - an extended command processor
- 4. ZDE.COM - a full screen text editor
- 5. ALIAS.CMD - ARUNZ alias definition file
- 6. EDITNDR.COM - a named directory segment editor
- 7. SAVENDR.COM - a named directory segment saver
- 8. PATH.COM - a command search path utility
- 9. NZBLITZ.COM - a Z-System image saver
- 10. IF.COM - a powerful conditional command processor
- 11. ZFILER.COM - a point and shoot file manager
- 12. ZFILER.CMD - ZFILER macro definition file
- 13. SDZ.COM - a sorted directory utility
- 14. HELP.COM - a help utility
- 15. CRLZH.COM - a compression tool
- 16. UCRLZH.COM - a decompression tool
- 17. LPUT.COM - a library building tool
- 18. LBREXT.COM - a library extraction tool
- 19. LT.COM - a library member typing tool
- 20. Z-FOR-AT.ART - this file
-
- To re-iterate, to make it easy for you to get started, both MYZ80100.ZIP
- and the 20 files listed above are available on a 720k 3.5" disk for $10
- from
-
- Small Computer Support, 24 East Cedar Street, Newington, CT 06111
-
- Z-System itself is of course not included and may be purchased from Sage
- Microsystems East at the address given above for $49 plus $3 S&H. Again,
- you are strongly encouraged to register your copy of MYZ80 by sending
- Simeon Cran $23.50 US at the address given above.
-
- The remainder of this document is a tutorial on the files listed above
- and on how they illustrate Z-System capabilities. If you know nothing about
- CP/M or Z-System, you should read what follows. If you are familiar with
- both, you might just want to skim the rest. Who knows, after reading all
- this, you may never want to use Microsoft Works or Microsoft Windows again!
- Personally, I'd reformat my 40 meg hard disk, bring up MYZ80, then Z-System
- and be up an running ... Why waste that valuable hard disk space on 16-bit
- software ; >
-
- 4.1 MYZ80.Z3T - A Terminal Capabilities File
-
- In "user area" 1 of "drive A" we find the terminal capabilities
- segment file MYZ80.Z3T. To activate this file, load it into the Z-System
- environment via
-
- A0:COMMANDS> nzcom 1:myz80.z3t
-
- [Note: I am putting a space between the prompt and the command to make this
- more readable. You should *not* use a space in front of your commands when
- you issue them. Doing so has a special meaning under Z-System and in the
- examples discussed here, we do not want this special meaning to be active.
- End of note.]
-
- To see one of the effects that this has, it's probably a good idea to bring
- the files mentioned above into the "A disk" by IMPORTing them. Do this now.
-
- A0:COMMANDS> import salias.com
- A0:COMMANDS> import arunz.com
-
- etc.
-
- A0:COMMANDS> import lbrext.com
- A0:COMMANDS> import lt.com
-
- [Note: You of course must have copied these files from your distribution
- disk to the MYZ80 subdirectory on your hard disk first. End of note.]
-
- If you now run the SDZ program, you should see certain areas of the display
- *hilighted*. Similary, ZFILER will show hilighting.
-
- A0:COMMANDS> sdz
- A0:COMMANDS> zfiler
-
- 4.2 SALIAS.COM - A Screen-oriented "real" alias editor
-
- The error message
-
- STARTZCM?
-
- mentioned above can be fixed by creating what's called (a "real") "alias"
- named STARTZCM.COM. Do this with SALIAS (pronounced "S-ALIAS".)
-
- A0:COMMANDS> salias startzcm
-
- Type in the following script:
-
- echo s%>ystem loaded.
-
- Exit "edit mode" by pressing ESC and save the result by pressing S. Quit
- SALIAS by typing X.
-
- When you brought up Z-System (by typing NZCOM,) several files got
- created. One of them is named NZCPM.COM. This is what you use to leave Z-
- System and return to CP/M. To see the effect of the existence of
- STARTZCM.COM, leave Z-System and then re-enter Z-System.
-
- A0:COMMAND> nzcpm
- A0> nzcom
-
- The message "System loaded." followed by the A0:COMMANDS> prompt should
- appear at the end of the load sequence now.
-
- SALIAS may be used to define any "alias" you want. Another simple
- example of an alias will be presented when we discuss IF.COM below.
-
- NZCOM is "hard-coded" to run the command STARTZCM after it does its
- segment loading. STARTZCM may be anything you want. We chose to define a
- simple "real" alias that emits a brief message.
-
- If you run SDZ at this point, the nice hilighting will no longer
- occur (because the "terminal capabilities segment" no longer contains the
- "fancy stuff" held in MYZ80.Z3T.) To further automate things, we could beef
- up the STARTZCM alias by adding a line to it. Re-execute SALIAS on
- STARTZCM, press ctrl-N to insert a line in front of the echo etc. etc. line
- and enter:
-
- nzcom 1:myz80.z3t
- echo s%>ystem loaded.
-
- Now, when you bring up Z-System from CP/M (by typing NZCOM,) you should get
- hilighting with SDZ, ZFILER etc.
-
- 4.3 ARUNZ.COM - An Extended Command Processor
-
- The first thing you should do with this file is rename it to
- CMDRUN.COM. CP/M, you may recall, has 6 built-in (resident) commands. They
- are DIR, ERA, REN, SAVE, USER and TYPE. If you try:
-
- A0:COMMANDS> ren cmdrun.com=arunz.com
-
- it will fail, because REN is not a resident command under Z-System (to list
- the resident commands available, type H (help) at the A0:COMMANDS prompt.)
- The "stock" resident command processor has ERA and TYPE and several others,
- but no REN. There are two ways to get around this problem. One way would be
- to leave Z-System and return to CP/M and use its REN command.
-
- A0:COMMANDS> nzcpm
- A0> ren cmdrun.com=arunz.com
-
- and then return to Z-System:
-
- A0> nzcom
-
- The other way is to run ZFILER, press the space bar til the file pointer is
- on ARUNZ.COM, then press R (to rename) and type in CMDRUN.COM. Exit ZFILER
- by pressing X.
-
- ARUNZ is what is known as an "extended command processor." A well-
- defined series of steps are taken by the command processor segment of Z-
- System as it tries to figure out how to resolve any command it's given at
- the "A prompt." If the command you enter is not one of the "resident" ones,
- or a "transient" one (a .COM file,) your command is fed to an "extended
- command processor" named CMDRUN.COM. In ARUNZ's case, the command is
- resolved by searching for it in a text file named ALIAS.CMD.
-
- Here is a simple illustration of an ARUNZ type "alias." Use the full-
- screen text editor ZDE to create the file ALIAS.CMD.
-
- A0:COMMANDS> zde alias.cmd
-
- Enter the following definition for the alias DIR.
-
- DIR sdz $*
-
- Save the file (ESC S) and quit the editor (ESC Q.)
-
- If you had typed
-
- A0:COMMANDS> dir
-
- before renaming ARUNZ.COM to CMDRUN.COM and running ZDE and creating the
- ALIAS.CMD file, Z-System would come back with the error
-
- DIR?
-
- Why? Because, the "stock" resident command processor doesn't include a DIR
- and there is no "transient" DIR.COM.
-
- But now that we have an extended command processor and a definition
- for an alias DIR, the effect of the command
-
- A0:COMMANDS> dir
-
- is the same as the effect of
-
- A0:COMMANDS> sdz
-
- The $* in the definition for the DIR alias means "the command tail," so
-
- A0:COMMANDS> dir *.com
-
- would resolve to
-
- A0:COMMANDS> sdz *.com
-
- ARUNZ is a mature command processor, supporting many powerful parameters.
- As this document is only a primer, only one other parameter ($1) will be
- discussed (when we talk about IF.COM.) Full documentation on ARUNZ is
- provided when you purchase Z-System.
-
- 4.4 ZDE - A Full-screen Text Editor
-
- ZDE (Z-System Display Editor) is the most popular full-screen text
- editor for CP/M. Its use has already been mentioned briefly above when we
- updated the file ALIAS.CMD. ZDE is very similar to WordStar. You may use
- the "WordStar diamond" to move the cursor around (ctrl-s, -d, -e, -x.)
- Online help is available via ESC H. It is good for under 40k files. Full
- documentation is available.
-
- 4.5 ALIAS.CMD - ARUNZ Alias Definition File
-
- We have touched on the role this text file plays already. More
- information on ARUNZ and example ALIAS.CMD scripts are provided when you
- buy Z-System.
-
- 4.6 EDITNDR.COM - A Named Directory Segment Editor
-
- When you bring up Z-System, two "drive/user areas" are automatically
- given suggestive *names*. Drive A user 0 is named COMMANDS and drive B user
- 0 is named WORK. To change directories, you may type the drive letter, then
- the user area number, then a colon (:) and finally the enter (return) key.
- Alternatively, if a name has been given to a drive/user area, you may type
- the name, the colon and the return key.
-
- A0:COMMANDS> WORK:
- B0:WORK>
-
- EDITNDR is a named directory segment editor. You may add, delete etc. named
- directories with it. For example, you might want to name Simeon's drive A
- user area 1, the one with MYZ80.Z3T in it. Although only one file has to do
- with terminal capabilities, let's name it TCAP.
-
- A0:COMMANDS> editndr
-
- At EDITNDR's prompt, enter
-
- A1:TCAP
-
- and then leave EDITNDR by typing X. If you now type
-
- A0:COMMANDS> tcap:
-
- you'll see
-
- A1:TCAP>
-
- To make this association permanent, you could use the utility SAVENDR to
- create the file SAVED.NDR and then add one more line to the STARTZCM alias
- described above.
-
- A0:COMMANDS> savendr
- A0:COMMANDS> salias startzcm
-
- Enter the new line shown below
-
- nzcom saved.ndr
- nzcom 1:myz80.z3t
- echo s%>ystem loaded.
-
- Named directories are a good idea because you no longer have to remember
- the drive/user they correspond to. Just the meaningful name *you* choose.
- You might for example want to call C0 PROJECTS and C1 DATABASE.
-
- 4.7 SAVENDR.COM - A Named Directory Segment Saver
-
- This program simply saves the currently defined named directory
- segment names into a file named SAVED.NDR. It may be loaded into memory
- with NZCOM. I envision A.DSK files created by one person and distributed to
- others. These .DSK files will have a *logical* structure which an included
- SAVED.NDR file will help reveal.
-
- 4.8 PATH.COM - A Command Search Path Utility
-
- Stock Z-System comes with a command search path of A0 $$ A0. $$ means
- "currently logged drive, currently logged user area." This path is searched
- to find .COM files. Say you are logged into drive B, user 2, and you type
-
- B2> zfiler
-
- Since ZFILER.COM is in drive A, user 0, the command will work. If
- ZFILER.COM had for some reason been moved to drive B user 0, the command
- above would fail. You may use the PATH utility to establish the search path
- you want. For example
-
- A0:COMMANDS> path c0 b0 $$ a0
-
- If this path were active, and ZFILER.COM were in B0, the ZFILER command
- above would work.
-
- 4.9 NZBLITZ.COM - A Z-System Image Saver
-
- This utility will help speed up the transition from CP/M to Z-System.
- Instead of running NZCOM and waiting while all the segments get loaded, you
- may use NZBLITZ to save a complete image of a loaded Z-System into a .COM
- file. For example:
-
- A0:COMMANDS> nzblitz image
-
- A file named IMAGE.COM will get created. It will contain the named
- directory names, the terminal capabilites segment, the command search path
- etc. etc. If you leave Z-System and return to CP/M (or to MSDOS/DRDOS etc.,)
- you may quickly re-generate this Z-System environment via
-
- C:\MYZ80> cpm
- A0> image
-
- It might be noted that with this approach, no longer will the STARTZCM
- command be automatically run (this only happens when you go from CP/M to Z-
- System with NZCOM.) What our STARTZCM did is not needed anymore anyway
- since the segments this "real" alias loaded are saved in and reloaded by
- IMAGE.COM! NZBLITZ does have a nice feature you may want to use, however.
- If you invoke NZBLITZ as follows
-
- A0:COMMANDS> nzblitz image;echo s%>ystem created 08/21/92
-
- then, when you go from CP/M to Z-System, via
-
- A0> image
-
- the message
-
- System created 08/21/92
-
- will be displayed.
-
- 4.10 IF.COM - A Powerful Conditional Command Processor
-
- Z-System supports both a "resident command processor" and a "flow
- control command processor." Typical flow control commands are IF, ELSE and
- FI. These commands are typically used in aliases to support conditional
- command invocation. Here's a simple example. Say you defined the following
- ARUNZ (or "real") alias and called it MYTYPE:
-
- if exist $1;type $1;else;echo $1 %>doesn't exist;fi
-
- Z-System uses semi-colons (;'s) to separate commands in a multiple command
- line. Say the file MYZ80.DOC were in A0 and you were logged into A0 and you
- issued the command
-
- A0:COMMANDS> mytype myz80.doc
-
- The "stock" flow control processor supports an IF which only supports a few
- testable conditions (ERROR and NULL.) EXIST is not an included testable
- condition. The transient IF.COM, if available, will automatically load if
- the resident IF is insufficient. IF.COM supports a host of conditions,
- including EXIST. The command above would result in the typing out of
- MYZ80.DOC. Notice the role of the $1 argument. It gets replaced everywhere
- it occurs by the first argument in the command tail.
-
- To see the testable conditions IF.COM supports, you may invoke IF.COM
- directly and use the standard Z-System help tail, //, to request syntax and
- usage.
-
- A0:COMMANDS> if //
-
- 4.11 ZFILER.COM And 4.12 ZFILER.CMD
- A Point And Shoot File Manager and its macro definition file
-
- ZFILER is a powerful "point and shoot" file manager. With it, you may
- view, rename, delete, copy, etc. files. It has online help which may be
- seen by typing / in response to ZFILER's prompt. Typing / again will bring
- you back to the file name display.
-
- ZFILER is our first example of what is known as a "shell." What this
- means is that while using ZFILER, you may issue the command Z to
- temporarily suspend ZFILER and, at the new prompt ZFILER itself provides,
- issue *any* Z-System command. For example, you might want to run the ZDE
- editor on the file MYZ80.HLP. Just type Z, and at the new prompt, type ZDE
- MYZ80.HLP. After you have finished your edit session and quit the editor,
- you will see the message "Strike any key." Upon hitting any key, ZFILER
- will automatically get re-invoked and its file name display will appear.
- Thus, "shells" are programs that act as "front ends" to the user, allowing
- the user to temporarily leave, do something else, and then be brought back
- automatically.
-
- ZFILER has one more powerful feature worth briefly mentioning at this
- point. If a file named ZFILER.CMD is available, and it contains the
- following:
-
- 1! zde $p
- 2! echo 08/21/92
- #
- 1. edit currently pointed at file
- 2. show version date
-
- then, if the file pointer is on the file MYZ80.HLP and you press the 1 key,
- the ZDE editor will automatically get run and you will be editing the file
- MYZ80.HLP! The structure and meaning of ZFILER.CMD files will not be
- discussed further here. Again, this information is well covered with the
- manual you get when you purchase Z-System.
-
- 4.13 SDZ.COM - A Sorted Directory Utility
-
- This is a sorted directory program. It has been mentioned above as
- something that could be used to make the command
-
- A0:COMMANDS> dir
-
- do something useful (via an ARUNZ alias.) SDZ has many options. Type SDZ //
- to see what they are.
-
- A0:COMMANDS> sdz *.hlp /da
-
- would display the names of all .HLP files on all drives and in all user areas.
-
- 4.14 HELP.COM - A Help Utility
-
- One of the nicest things about Z-System is the extensive help
- available. Help comes in many forms. We've mentioned using the // as a
- command tail several times now. This shows you syntax and usage. This
- information is hard-coded in the executable (.COM) file. Another form of
- help is found in external .HLP files. These files are most effectively
- browsed with the HELP utility, HELP.COM. An extremely simple .HLP file
- follows. Say the file Z-FOR-AT.HLP contained:
-
- Introduction
- What You Need And How To Get It
- : Introduction
-
- On August 1, 1992, ...
- blah blah blah
-
- : What You Need And How To Get It
-
- As of this writing ...
- blah blah blah
-
- At the prompt, type
-
- A0:COMMANDS> help z-for-at
-
- What you would see on your screen would be
-
- A. Introduction
- B. What You Need And How To Get It
-
-
-
- Selection:
-
- If you pressed A, the text starting with : Introduction would get
- displayed. If you pressed B, the text starting with : What You Need And How
- To Get It would get displayed. .HLP files can be much more complex (they
- may have a tree-like structure.)
-
- 4.15 CRLZH.COM And 4.16 UCRLZH.COM
- A Compression And A Decompression Tool
-
- To save disk space, these two programs are used to compress and
- uncompress files. When a file is LZH-compressed, a much smaller file with
- the same first name and a file type with a Y replacing the middle letter of
- the file's filetype is created. Other compression and packaging tools are
- available, but the tendency for CP/M material seems to be leaning toward
- LZH-compression followed by library packaging. See below for library tools.
-
- 4.17 LPUT.COM And 4.18 LBREXT.COM And 4.19 LT.COM
- A Library Building, A Library Extracting And A Library Typing Tool
-
- LPUT (Library PUT) is used to create and add members to library files
- (.LBR files.) NZCOM.LBR is a library file. Other packaging techniques are
- popular (.ZIP, .ARC etc.) but .LBR's are the most common CP/M packaging
- method. LBREXT is used to extract files from libraries. It supports options
- to "inspect" (ie. say yes or no to the extraction) and "decompress," and
- all popular compression methods, including the latest, LZH, are supported.
- Finally, LT, Library Typer, lets you view (type out) a member of a library,
- compressed or not.
-
- This concludes this Primer. I strongly encourage you to take advantage
- of both Cran's revolutionary new product (MYZ80) and the Z-System it lets
- you use on your AT-class (80286, 80386, 80486 etc.) computer. It is so
- exciting to me that CP/M, where "it" all started, has come full circle and
- is now usable in a much more powerful version (Z-System) on a much bigger
- and faster machine. Preliminary runs of benchmark programs show that
- programs run from slightly slower to much faster (depending on what AT-
- class computer you use.) There is a wealth of software available for Z80-
- based machines and with the MYZ80 breakthru, I predict development of new
- applications will increase.
-