Z3MD-59k.LBR - ZCPR3 Installation for Morrow Micro Decision MD-1, 2, or 3, using Revision 1 or Revision 2 motherboard. (C) Copyright 1984 by Brian Leyton. The author gives permission to reproduce in part or in whole, by any means, as long as the purpose is for NON- COMMERCIAL use ONLY. Revision 2.1 - 11/21/84 Please read this file carefully. If you have any questions, problems, suggestions, etc., I can be reached in the following manners: Preferably: Through the LAMUG RCP/M: (818)340-9947 300/1200 baud; 24 hrs except when in use by SYSOP. SYSOP is Bob Moeller. Or: Through the Glendale RCP/M: (818)956-6164 300/1200 baud; 24 hrs except when in use by SYSOP. SYSOP is Abel Iwaz. Or: MCI Mail ID: BLEYTON Or: Home phone: (818)766-3307 IMPORTANT NOTE: There have been problems with MOVCPM on early versions of the BIOS. Therefore, you will want to make sure you have the latest revision available. The latest revision numbers are 1.6 for Revision 1, and 2.3 for Revision 2. Upgrades are available from Morrow for $25 (or you might be able to con your local dealer into giving you a copy for free). The files you will need for this installation are this .LBR file, Z3COM.LBR which contains all of the ZCPR3 utilities, and Z3HELP.LBR which contains the HELP files for ZCPR3. The HELP files are your documentation for ZCPR3. They can be called up on the screen, or they can be printed out using HELPPR.COM which is specifically designed for printing HELP files. You will also want Z3PHASE2.LBR which has the Phase 2 distribution of ZCPR3. This includes DU3 and MU3, VFILER, CLEANDIR, SHSET, and other very useful parts of ZCPR3. Also pick up ZEX31.LBR which has the latest version of ZEX. You will want to obtain the ZCPR3 newsletters which are put out by ECHELON Inc. who markets ZCPR3 commercially. These newsletters are available from the above RCP/Ms as well as many others. They are called Z3NEWS.### and the latest one at the time of this writing is Z3NEWS.009. There will also be a manual published, called (appropriately): "ZCPR3: The Manual". It is available through Echelon Inc. If you decide you are enough of a ZCPR3 enthusiast that you want to keep up on the latest developments with Z3, you can call the ZCPR3 BBS at (415)489-9005 (300/1200 baud; 24 hrs except while in use by SYSOP.) NOTE: This particular installation is for any Morrow MD-1, 2, or 3 whether you have the Revision 1 board or the Revision 2 board. The ZCPR3 files are exactly the same, the only differences are in the BIOS patch and the MAKE.SUB file. NOTE: This revision of the installation package uses a new version of the BIOS patch written by Ted Silveira, which eliminates the need for Z3INIT.COM. The BIOS patch does all initialization neccessary. ***************************************************************** * * * Address Range Size Function * * ------------- ------- -------- * * 0 - FF 256 b Standard CP/M Buffers except * * 40 - 4A 11 b for ZCPR3 External Path * * 3E 1 b Wheel Byte * * 100 - C7FF ~50 K TPA * * c800 - d005 2 K ZCPR3 Command Processor * * d006 - ddff 3.5K BDOSZ * * de00 - ebff 3.5K CBIOSZ with Buffers * * ec00 - f5ff 2.5K Resident Command Package * * f600 - f87f 640 b Flow Command Package * * F880 - f97f 256 b Environment Descriptors * * Bytes 00H-7FH: Z3 Parameters * * Bytes 80H-FFH: Z3 Terminal Cap * * f980 - f9cf 80 b ZCPR3 Message Buffers * * Byte 0: Error Flag (Z/NZ) * * Byte 1: IF (8 Levels) * * Byte 2: IF Active (8 Levels) * * Byte 3: Z3 Cmd Status * * 00B - Normal * * 01B - Shell * * 10B - Error * * Bytes 4&5: Error Address if 10B * * Byte 6: Program Error Code * * Byte 7: ZEX Message Byte * * 00B - Normal * * 01B - Z3 Prompt * * 10B - Suspend Intercept * * Byte 8: ZEX Running Flag (0=No) * * Bytes 9-10: Address of Next * * Char for ZEX to Return * * Bytes 11-12: Address of First * * Char in ZEX Memory- * * Based File Buffer * * Byte 13: SH Control Byte * * Bit 0: Enable SHCMT * * Bit 1: Enable SHECHO * * Bit 7: Enable Shell * * Entry Wait * * Bytes 14-15: Shell Scratch * * Bytes 10H-2FH: Error Cmd * * Bytes 30H-39H: Registers * * Bytes 3AH-3FH: Reserved * * Bytes 40H-4FH: User-Defined * * f9d0 - f9ff 48 b ZCPR3 External FCB * * fa00 - faff 256 b Memory-Based Named Directory * * fb00 - fb2f 48 b ZCPR3 External Stack * * fb30 - fbaf 128 b ZCPR3 Shell Stack * * fbb0 - fbff 79 b free space * * fd00 - fdfe 255 b Multiple Command Line Buffer * ***************************************************************** A visual representation might help also... Address FFFF ---------------------------------------------- | ROM area (?) | 512b FE00 ---------------------------------------------- | ZCPR3 Multiple Command Line Buffer | 255b FD00 ---------------------------------------------- | ROM area (?) | 256b FC00 ---------------------------------------------- | free space | 79b FBB0 ---------------------------------------------- | ZCPR3 Shell Stack | 128b FB30 ---------------------------------------------- | ZCPR3 External Stack | 48b FB00 ---------------------------------------------- | ZCPR3 Memory-Based Named Directory(s) | 256b FA00 ---------------------------------------------- | ZCPR3 External File Control Block | 48b F9D0 ---------------------------------------------- | ZCPR3 Message Buffers | 80b F980 ---------------------------------------------- | ZCPR3 | Z3TCAP (S) | \ F900 | Environment --------------------- > 256b | Descriptor (S) | / F880 ---------------------------------------------- | ZCPR3 Flow Command Package (S) | 640b F600 ---------------------------------------------- | ZCPR3 Resident Command Package (S) | 2.5K EC00 ---------------------------------------------- | ZCPR3 BIOS with Modified Cold Boot | | Routine to Initialize All Elements | 3.5K | of the ZCPR3 System Above | DE00 ---------------------------------------------- | CP/M BDOS | 3.5K D005 ---------------------------------------------- | ZCPR3 Command Processor | 2K C800 ---------------------------------------------- | Transient | | Program | ~50K | Area | 100 ---------------------------------------------- | CP/M and ZCPR3 Buffers | 256b 0 ---------------------------------------------- There still is a small amount of space left over: 79 bytes at the top end of memory right after the Z3 Shell Stack. I have expanded the RCP by 512 bytes, and the FCP by 128 bytes, more than enough to fit all possible utilities and Flow Commands. I also implemented what other utilities were available in the CCP except that I did not implement SUBMIT processing, so you will have to use ZEX instead (no biggie there, ZEX is much more powerful anyhow). I also didn't implement the GET command (which is supposed to take a .COM file and load it into memory without executing it) since I found that it didn't work quite how I felt it should (possible bug?). I renamed the DIR command to D since I prefer to rename SD.COM to DIR.COM. To see what commands are available in the system, check Z3HDR.LIB for CCP commands, and SYSRCP.LIB for RCP commands (or just type H at the A> prompt). All system segments are installed in the system except for the I/O package. That requires around 2k of contiguous memory and is a lot of work to install. Not to mention that the lack of an IOBYTE in the Morrow BIOS might make it even tougher. I might play with it someday though... As you will notice from the memory map, all of the ZCPR3 buffer space is contiguous except for the 255 byte Multiple Command Line buffer. By moving the MCL buffer up there (between some fixed buffers used by the computer), I was able to implement a full RCP and a full FCP without shrinking the system any more. The following files are provided in this LBR file for installing ZCPR3: Name Description =========================== SYS.ENV Environment Descriptor. \ \ SYS.RCP Resident Command Package. \ Pre-installed > SYS.FCP Flow Command Package. / System Segments / SYS.NDR Named Directories. / Morrow init & install Files STARTUP.COM ZCPR2 utility executed as startup command by ZCPR3. MAKE.SUB EX/ZEX file to integrate BIOS patch and ZCPR3 Command processor into CP/M sysgen image. ZCPR3.INS ZCPR3 install program used with Z3INS.COM to install the ZCPR3 utilities. LDR.COM ZCPR3 loader program for loading System Segments. Z3PATMD.HEX Source code of BIOS patch for initialization of ZCPR3 buffers. ZCPR3.HEX Hex code of ZCPR3 Command Processor for replacing the CCP. Misc. Support files. MLOAD.COM Public Domain replacement for DRI's LOAD.COM. Needed if you want to re-assemble System Segments. TELL.COM Public domain utility which tells you where important operating system routines are located (including your CCP, BDOS and BIOS). EX.COM A public domain utility which ZEX was based on, but designed to run on non-ZCPR systems. Used in place of SUBMIT and XSUB. Header (LIB) files: (only required for Re-Configuration of ZCPR3) Z3BASE.LIB Header file describing the locations of the system segments and buffers. Z3HDR.LIB ZCPR3 header describing options selected for ZCPR3 CCP. SYSENV.LIB Header for environment descriptor and Z3TCAP (terminal definition). SYSRCP.LIB Header for Resident Command Packages. SYSFCP.LIB Header for Flow Command Packages. SYSNDR.LIB Header for Named Directories. The following files are not provided in this LBR file, but are on your CP/M distribution diskette. ------------------------------------------------------------------------------ Commercial Software: SYSGEN.COM Program for reading Operating System off of system tracks into memory and writing modified system back to disk. MOVCPM.COM Used to create CPM59.COM, a 59K CP/M image. CPM59.COM Created by MOVCPM and SYSGEN. DDT.COM Used to integrate ZCPR3 and the BIOS patch into your CP/M system image. The following are needed only if you want to re-assemble ZCPR3 or it's utilities. ------------------------------------------------------------------------------ MAC.COM DRI's Macro Assembler. (required for re-assembly of ZCPR3 Command Processor and System Segments.) M80.COM Microsoft Z80 Macro Assembler. \ > for re-assembling utilities. L80.COM Microsoft Relocatable Linker. / Other files: ZCPR3.ASM ZCPR3 CCP source SYSENV.ASM Environment Descriptor SYSRCP.ASM Resident Command Packages SYSFCP.ASM Flow Command Packages SYSNDR.ASM Named Directories +----------------------------------------------------------------------------+ | You should have the ZCPR3 installation manual printed as reference, if you | | intend on changing anything. It can be found as Z3INSTAL.LBR on many RCPMs.| +----------------------------------------------------------------------------+ Steps for installation ====================== To create CPM59.COM: 1. You should start by placing your CP/M distribution diskette into drive A: and pushing RESET. Next, answer all of the questions for your specific system, and place a blank disk in B: when it tells you to. When the whole process is completed, take out the Distribution Diskette, and replace it with the disk from B: and push RESET. Just get out of all of the Micro-Menus by typing C to get to the Create Working Diskettes menu, and then a couple of s to get back to CP/M. At this point, you should ERAse PILOT.COM so it doesn't bother us anymore. Then put the CP/M distribution Diskette into B: and type this: PIP A:=B:TERMINAL.DAT PIP A:=B:INIT.* When that is finished, you may put the Distribution Diskette away for safekeeping again. 2. Now, you will use MOVCPM to shrink your system to a 59k system by typing: A>MOVCPM 59 * NOTE: If you run into a SYNCHRONIZATION ERROR in MOVCPM, this means you are trying to use MOVCPM on a different copy of CP/M than the one which MOVCPM is set up for (it checks serial numbers). If the Operating System and MOVCPM came from the same disk, you shouldn't have this problem, but if you do, you will have to either get a new Distribution Diskette, or try out one of the messages floating around which tell you how to bypass the Synch Error. Then you type SYSGEN, answer the first question with , the second with "A", the third with a , and the fourth with a . The system will probably hang, so just hit the RESET button on the computer. 3. The computer should sign on with a message indicating that it is a 59k CP/M 2.2 Rev. x.x system. You now type INIT, place another blank diskette into B: and answer all of the questions again like you did before. 4. When that is completed, you should boot the computer with the disk which was just in B: It will come up with the familiar PILOT?, and the A> prompt. Next you should type SYSGEN, answer A to the first question, to the second, and to the third. When you get back to the A> prompt, type: SAVE 46 CPM59.COM ------------------------------------------------------------------------------ EXPLANATION OF ALL OF THIS STUFF What you have just done, is create a 59k CP/M system, initialize it with the correct information about your particular computer, and save it into a file called CPM59.COM. Don't worry about the fact that it took 3 diskettes and about 20 minutes to do it, it's all downhill from here... Now, you ask...what the heck is a 59k system??? Well, what you started off with was a 64k system. That is, you were using all available memory other than that used by your operating system, for the TPA (Transient Program area) which is where .COM files run. Right above the TPA is the Operating System. When you make a 59k system, you are shifting the location of the operating system down by 5k (thus shrinking your TPA by 5k). This leaves that 5k up above the operating system, protected from your programs. The reason we made that space up there is because ZCPR3 uses it for extensions to the operating system such as the Resident Command Package, and for other buffers. So now, you can look at the memory map above, and see how everything fits in memory. Well, I can anticipate your next question... But what about that 5k ??? Will my programs still run with less memory? Well, the answer is that you will probably never notice that it's gone. Most programs will buffer onto disk when they run out of memory. So except for a couple of programs (usually language compilers) which only work in available memory, you will have absolutely no trouble. The solution is to keep a standard CP/M or ZCPR2 64k system disk around in case of emergency... (see Miscellaneous notes at the bottom of this file for more details) ------------------------------------------------------------------------------ Integrating ZCPR3 and Z3PATMD into your system image. All you need to do now, is put these files onto one disk: (a good one to use is the one you just used to create CPM59.COM - just delete everything but CPM59.COM, ASM.COM, and DDT.COM...) LDR.COM MAKE.SUB STARTUP.COM SYS.ENV SYS.FCP SYS.RCP SYS.NDR Z3PATMD.ASM ZCPR3.HEX EX.COM CPM59.COM DDT.COM ASM.COM You now have to customize Z3PATMD.ASM (the BIOS patch), and MAKE.SUB for your particular version of the BIOS. Just call the files up with an editor (WordStar or NewWord in Non-Document mode will do fine) and follow the directions at the top of the file. When all that is finished, place the disk with all those files in A: and type: A>EX MAKE This will call up DDT, overlay ZCPR3 over your CCP, insert the patch into your BIOS, and modify a jump at the end of the Boot to jump to the patch instead of to GOCPM. Then, it saves the new operating system as ZCPR3.COM. All you do now, is type ZCPR3. You will see SYSGEN come up on the screen. Just answer question 1 with a , question 2 with "A", question 3 with , and question 4 with another . You may then reboot the system. (you might want to do a complete restart from power off so that the computer can initialize memory.) Congratulations! You now have a functioning ZCPR3 system! Installing the ZCPR3 utilities You will need to install the ZCPR3 utilities (.COM files from Z3COM.LBR). Have all the .COM files on a single disk, and also ZCPR3.INS and SYS.ENV. Then execute the following command: A>Z3INS SYS.ENV ZCPR3.INS (if you can't fit all the files on one disk, just divide them up & ,make sure you have Z3INS.COM, SYS.ENV, and ZCPR3.INS on each disk) ALL ZCPR3 utilities will now be installed and ready to use. You should try the utility SHOW.COM which is kind of a diagnostics program for ZCPR3. This will give you a good idea whether everything is functioning properly. Once you have determined that everything works as it should, you can go ahead and SYSGEN your disks from your working ZCPR3 disk. Any diskette Sysgened with ZCPR3 will boot up, but none of the resident utilities will be loaded until you load the System Segments, so you should make sure that the diskettes you normally boot up with contain these files: STARTUP.COM LDR.COM SYS.ENV SYS.RCP SYS.FCP SYS.NDR These files only take up about 18k, but this could count in some situations, (especially on an MD-2) so don't bother with them except on the disks you will be booting from. **************************** *** Very Important NOTE: *** **************************** Modifying STARTUP.COM STARTUP.COM is a ZCPR2 utility, for those of you not familiar with ZCPR2. It contains an initial command line which ZCPR2/ZCPR3 executes before it gives control of the system to the user. To change that command line, issue the following command: A>STARTUP S STARTUP will come up with a prompt. Enter ? for help. With the STARTUP utility, you can have ZCPR3 go into a menu, or run any type of turnkey system you want, upon coldboot. When you change the command line in STARTUP, you should have the following commands in this order, as a minimum requirement; LDR SYS.ENV,SYS.NDR,SYS.FCP,SYS.RCP;WHL SYSTEM This loads the system segments,and sets the wheel (privileged user) byte on. After that, you can have it go into MENU, MBASIC or dBASE-II, etc. If you have a very long set of startup routines (the limit is currently 255 bytes), you can do it in 2 startup files. After you do all the initialization, you can execute another STARTUP command line (e.g. Called STAR2.COM), and have it do the rest. To create a STAR2.COM, you can either use ALIAS or STARTUP S and save it under a new name. MISCELLANEOUS NOTES 1. You should probably run SETUP.COM (For Rev. 2 machines) or SETBAUD (for Rev. 1) after this whole process to ensure that all of the defaults are set correctly for your system (such as printer port, baud rate of serial port etc.). Running MOVCPM makes all of these settings go back to their original values. 2. The TERMCAP is set up to treat the terminal just like a TeleVideo 950. If this is not satisfactory (It should be fine for almost all of the terminals sold with Morrows including the MDT-60/70, Freedom 50/100 and probably the MDT-20 also - as long as it uses standard ADM-3A Cursor Addressing) then you will have to edit the SYSENV.LIB file. 3. You may encounter problems if you are using MEX which was configured using Sandy Berger's overlay. This overlay uses direct BIOS calls for console output and since you have changed the location of the BIOS with MOVCPM, you will have to change the overlay for the correct position of the CONOUT routine. All you have to do is run TELL.COM on your new ZCPR3 system and find the location it gives for your Console Output routine, and patch that location into the MEX overlay. The spot to change is down towards the bottom after the port and modem initialization routines. 4. This configuration is set up for a 2 drive system with drive C: as the Virtual Drive. ZCPR3 will not recognize drives D or E. If you have more than 2 drives, you will have to modify Z3HDR.LIB and reassemble ZCPR3.ASM. If you do have to reassemble the system, you should install ZCPR3 for one more drive than you actually have, so it can be the Virtual Drive. 5. There is a small problem of compatibility between ZEX and SMARTKEY. You should unload SMARTKEY before executing ZEX, or it will send the system off into outer space. 6. There have been reports of problems with NewWord running under the 59k system (lack of sufficient memory). The problem has been resolved though, by the release of newer versions of NewWord. If your version of NewWord is not at least Revision 2.x, then you can obtain an upgrade from NewStar for $25. GOOD LUCK!!!!! (EOF)