home *** CD-ROM | disk | FTP | other *** search
- This file contains all the DOC files for release's 1.0 2.3 2.4 of
- Z80DOS.
-
- Main notes: To find changes for generation of a .ZRL file, search for ZRL
- in the sources Z80DOS24.Z80, Z80DCHAR.Z80, and Z80DHDR.LIB.
-
- To find changes necessary for use of Z80MR, search for Z80MR
- in the source Z80DOS24.Z80. Z80MR CANNOT be used to generate
- a .ZRL file, so make sure all changes for a ZRL are commented
- out ( distributed with them commented out ). See Z80DZ80M.NOT.
-
- Z80DOS v 2.4
- 4/9/89
- Eugene Nolan
- C/O DHN* RCPM 215-623-4040
-
- Welcome to all Z80DOS users, potential users!!!!
-
- Since the 2.3 release of Z80DOS, and the subsequent 2.31DK release,
- there have been a number of changes.
-
- 1: Z80DOS can now be assembled with Z80MR.
- Set the equate Z80MR to -1 in Z80DOS24.Z80
- Set the equate NOZ80MR to 0
- Make all your other changes for your system, and use Z80MR to create
- a .HEX file. You can then use MLOAD to create a .COM file if that
- if your method of system installation, or use the .HEX as is.
-
- 2: Fast disk reset capability has been added. At the label FIXDRV in
- Z80DCHAR.Z80, you can now set which drives are 'hard', ie: cannot
- be removed. This gives the added advantage of not requireing
- Z80DOS to rebuild internal tables (disk allocation tables to be exact) every
- time a warm boot is performed, providing significant speed increase.
-
- The fixdrv variable is a drive 'vector', that is it has one bit for
- each drive, starting from bit 0. If that bit is set, and the drive
- has been 'logged' in, then no warm boot or general disk reset will
- cause the tables to be re-built.
-
- BUT at a few penalties!
-
- One penality is that SUBMIT is no longer reliable if the A drive is
- set to being 'hard'. For those of you using EX or ZEX, that should be
- of little consequence, BUT for those of you that do not use EX/ZEX, there
- are two choices:
-
- 1: Don't make the A drive hard
- 2: If you are using a CCP that allows you to choose the method of
- checking for the $$$.SUB file, then have the CCP look for it
- explicitly, that is, set SUBCLUE to FALSE.
-
- The other penality is that if you run programs that bypass the BDOS
- for doing disk IO, programs such as UNERA, ZAP, DU, etc, etc, then
- the drives you use them on should not be 'hard', or you must
- explicitly do a specific drive reset to those drives (or verify that
- the program you use does). This is because if you do not, then the
- allocation tables for that drive will be incorrect, with possible NASTY
- consequences.
-
- Note: the fixed drive vector can be 'poked' at location BDOS+13h,14h
- **** with bit 0 of BDOS+13h = drive A and bit 7 BDOS+14h = drive P.
- Ie: if BDOS is at DC00h, then DC13/14h is the fixed drive vector.
- The program TELL.COM will show you the BDOS entry address as
- BDOS+6, Ie: as from above the DC00h will be DC06h.
-
- 3: All the internal data bases have been moved from Z80DTIME.Z80 to
- the beginning of Z80DCHAR.Z80. This should provide compatability,
- at least at the data base location level, with other BDOS's available.
-
- ***************************************************************************
-
- Z80DOS 2.3
- 11/4/88
- Eugene Nolan
- C/O DHN* RCPM 215-623-4040 ( SYSOP BOB DEAN )
-
- PURPOSE:
-
- Z80DOS version 2.3 attempts to speed the most basic operation of
- the internals by decreasing the time it takes to look up the next extent
- of a file already open. The file may be open for reading or writing in
- either sequential or random (or mixed modes).
-
-
- METHOD:
-
- It does this by making use of File Control Block (FCB) entry 13, the 's1'
- 'unused' byte in the FCB. Z3X use this byte to pass the user number of a
- file referenced in the command line tail to the loaded transient, but
- after that the transient cannot expect it to still be there after the
- file is referenced.
-
- In FCB+13, Z80DOS23 will store the sector of the directory where the
- file was found. This scheme will work will all disk definitions up to
- 1024 directory entries. Note that this sector is relative to the base
- track offset for a given logical (physical) drive.
-
- If the file was referenced by a call to 'MAKE FILE' or a new extent was
- opened while reading or writing, the FCB+13 will here again contain the
- directory sector of the relevant entry in the directory.
-
-
- BDOS TUTORIAL:
-
- Access to the directory entries of a file using CPM 2.2 compatible
- BDOS's, at least 2.2 itself and the variants of P2DOS that are around,
- will all search the directory starting at the beginning every time an
- application has read/written more than 16k from a file, even if you have
- 16k allocation per block and can contain 16 entries per directory entry!
-
- Now let's say you have 4k allocation blocks, and 8 allocation
- references per directory entry ( a fairly standard hard disk system ),
- and there are 1024 available entries of which 256 are used (we have just
- done a SAP). Now we want to copy a 63k file to this drive. We start by
- checking to see if the file exists, this will require reading every
- directory entry for the 256 files. Now the file did not exist, so we
- 'MAKE' the file, again we must scan the directory looking for an unused
- slot in the directory, 257 directory entries scanned this time.
-
- Now we have a slot and we start writing, after we have written 16k, the
- CPM2.2 compatible BDOS must then open the next extent, so it will close
- the current one by searching all 257 directory entries for the FCB it
- already has opened, write out the updated entry, and allocate the next
- free block. 16k more and we then search 257 entries, write the updated
- entry and accept more input till we again have 16k's worth, again scan
- 257, write updated directory and accept the last 15k. The application
- then closes the file, which requires 257 more scans and the write of the
- updated directory.
-
- So all in all we 'looked' for this file thru over 1541 directory
- entries! Now don't forget that we copied that file from somewhere, and
- the above process was repeated every time the application read 16k from
- the source file!
-
- Now of course if we had fewer than 256 used entries to start with, then
- there would be a correspondingly less searching required.
-
- Z80DOS2.3 attempts to address the above searching by decreasing the
- number of searches required once a file is open and we have read/written
- more than 16k. The above scenario would of been completed with just a
- max of 529 directory entry scans. 257 for the original look to see if
- file exists, 257 to find a free slot, and then up to 4 for each of the
- 16k hunks and the final close.
-
-
- INCOMPATABLITIES:
-
- There are some side effects of the above scheme. It assumes that the
- root, and subsequent entries for the file, all fall in ascending order
- in the directory. This is assured by Z80DOS if files were made under
- it's control, as it will always 'make' the next directory higher in the
- directory.
-
- But this scheme of having a non-zero FCB+13 and subsequent directory
- entries occur higher in the directory is NOT strictly CPM2.2 compatible.
- That is not to say that a CPM 2.2 compatible BDOS cannot use the files
- created this way, it surely can, but it does say that some files created
- by the 2.2 BDOS may not be accessible by the Z80DOS2.3 BDOS. This can
- occur if you have ever had one file open for writing, and with the file
- open, have deleted a file that occurred lower in the directory than the
- current FCB, and the FCB entry overflows which requires opening a new
- one. The 2.2 BDOS will use the extent lower in the directory for the
- next entry, which Z80DOS2.3 cannot 'find' because it occurred before the
- files root directory entry.
-
- The execellent program DU can be used to find files that may cause a
- problem. Use it's 'F' command to show the directory entries for the file
- in question, if the last byte of the first line of each entry shows a
- value of 80, and the very last entry has a value not equal 80, then no
- problem, but if an entry with a value not equal 80 occurs BEFORE an
- entry with the byte equal 80, then this file will not be accessible in
- it entirety. To make it compatible, merely copy it to another drive, delete
- the original, and copy it back again. Or you can copy it to a different
- name on the same drive, delete the original, and rename the copy.
-
-
- TESTING:
-
- Z80DOS2.3 has been in use on my own system (64180/ZCPR33) and I have had no
- problems whatsoever. It is also in use on DHN* RCPM (SYSOP: Bob Dean), and has
- run smoothly the utilities required in the managment of a remote access system,
- which in this case is HBBS/BYE510/NZCOM/FOR/KMD and a myraid of others that
- are in regular use both manually ( by the SYSOP and callers alike ) and
- invoked for automatic BBS maintainence.
-
-
- DIFFERENCES:
-
- There are also other modifications made on the inside to combine like
- functions, rearrangement of code to provide 'minimal' paths for the most
- used functions, deletion of redundant code left over by modifications to the
- original P2DOS, and decrease of the size of the ascii error messages to
- make enough room for the new internal routines to implement the fast lookup
- code.
-
- ADDITIONS:
-
- There has been an addition of returning an identifier saying Z80DOS is
- present. This has been implemented by returning a 38 hex code in the
- D register upon the GET VERSION BDOS call (12).
-
- ZRL CAPABLE:
-
- The code as distributed has the necessary lines marked that are required
- for assembling to a .REL (read .ZRL) format for use with NZCOM and JETLDR.
- See the individual files for the required changes (search for ZRL ).
-
-
- IN CONCLUSION:
-
- All in all, on some test runs, I have noticed up to a 25% increase in
- through-put. Even copying 100k+ files to a floppy with only 23 files on it
- have seen 5% increases. And this is on a 10mhz 64180 homebrew SCSI ( both
- winchester AND floppy on SCSI ) based system ( 1 wait state for all mem/io
- accesses) running a CDC WREN II (50 ms avg ) with 0 interleave ( 512 byte
- sectors/ 1k deblocking).
-
- As an example, using VDE266 to call up the Z80DDISK file for editing (48k)
- took 4. seconds with the original Z80DOS2.0A, under the new scheme 3.6 secs,
- a savings of 10% time. This included the path search of ramdisk to drive A of
- the first partition on the winchester, load of VDE from there, read the file
- (also from drive A) till the file was being displayed on the
- terminal (19.2k baud, DTR handshaking).
-
- *****************************************************************************
-
-
- ----- Z 8 0 D O S -----
-
- CP/M Compatible Z-80 Disk Operating System
-
- Featuring Enhanced Integral File Date and Time Stamping
-
- Version 1.0
-
- October 1, 1987
- by
- Carson Wilson
-
-
-
- The author assumes no responsibility for losses resulting
- from the use or inability to use Z80DOS10.LBR. The parts
- of Z80DOS10.LBR created by Carson Wilson are hereby released
- to the public.
-
-
-
-
- CONTENTS
-
- 1. What is Z80DOS?
-
- 2. What is your purpose in releasing Z80DOS?
-
- 3. What are the differences between Z80DOS and CP/M?
- - CP/M function calls.
- - Modifications affecting several functions.
- - Additional function calls.
-
- 4. How does Z80DOS compare with some of the other BDOS
- replacements currently available?
- - Comparison of replacement disk operating systems for CP/M
-
- 5. How do I install Z80DOS on my system?
- - Installing DOS segment
- - Installing BIOS segment (optional)
-
- 6. What do the programs in Z80DOS.LBR do?
-
- 7. Acknowledgements
-
-
-
- 1. What is Z80DOS?
-
- Z80DOS is a replacement for CP/M's Basic Disk Operating System, or BDOS,
- for computers having a Zilog Z80 microprocessor. The BDOS is the module of
- CP/M which allows for standardization of CP/M programs by supplying "system
- calls" which are the same across the many different CP/M hardware
- configurations. It acts as an interpreter between application programs and
- your system's Basic Input Output System, or BIOS.
-
- Z80DOS supports all of the standard CP/M 2.2 BDOS functions, and adds
- several new functions and enhancements. All programs designed to run under
- standard CP/M will also work under Z80DOS. Programs designed to run under
- Z80DOS can take advantage of enhancements to the BDOS to perform functions not
- available under standard CP/M.
-
- Z80DOS fits in the same area of memory used by CP/M's BDOS. This makes
- it simple to install Z80DOS in any working CP/M system. By coding the BDOS in
- Z80 assembler, it is possible to fit more functions within the standard 3.5
- kilobytes of memory allowed by CP/M.
-
-
-
- 2. What is your purpose in releasing Z80DOS?
-
- Z80 Replacement Disk Operating System, or ZRDOS (tm), by Echelon, Inc.,
- has become a standard among many Z80 computer users. ZRDOS offers many
- important advantages over standard CP/M's BDOS, and I applaud the new standard
- ZRDOS has created.
-
- ZRDOS is lacking in one crucial area, though: it does not implement date
- and time stamping of files. ZRDOS users must rely on DateStamper (tm) by
- PluPerfect Systems, a separate program which requires additional memory and
- files and considerable programming overhead to use.
-
- Z80DOS solves these problems by making date and time stamping an integral
- part of the operating system (as do several of the other BDOS replacements
- below), and by implementing two new BDOS functions exclusive to Z80DOS which
- allow programs that modify or copy files to maintain file stamps with very
- little program overhead (as does no other current BDOS replacement).
-
- Z80DOS is a fully operational replacement BDOS for CP/M, and is the only
- BDOS I use on my own system. However, Z80DOS does lack some of the advanced
- features of ZRDOS (see table below). My purpose in releasing Z80DOS is not to
- supplant ZRDOS, but simply to generate interest in the ideas it contains.
-
- If you find the ideas used in Z80DOS worthwhile, please help by
- introducing others to Z80DOS.LBR. If widely accepted, the time stamping
- protocols of Z80DOS could form the basis for a file-stamping standard for Z80
- computer users.
-
-
-
- 3. What are the differences between Z80DOS and CP/M?
-
- 3.1. CP/M function calls.
-
- Z80DOS makes the following modifications to the CP/M standard functions:
-
- - CP/M Function - --------------- Z80DOS Modification(s) -----------------
- No. --- Name ---
-
- 2 Console out After 256 characters output, console status is checked.
- This makes it possible to exit a program by typing
- control-s followed by control-c. This feature is normally
- on, and may be turned off by setting bit 0 of address
- Z80DOS+19 to zero.
-
- 10 Read console Delete key is same as backspace. Control-u, control-r,
- and control-e are simply echoed to the screen.
-
- 15 Open file File access date and time are changed to reflect the
- current DOS date and time. If the f2 attribute bit is
- set, the file is available from all user areas on a drive
- (this is also the case with Search First and Search Next).
-
- 16 Close file If the file was written to, its update date and time are
- changed to the current DOS date and time, and its archive
- attribute (t3) is reset to zero.
-
- 19 Delete file To prevent accidental erasure, public files (see below)
- and system files can only be erased from their home user
- area by using unambiguous file names.
-
- 22 Create file File create date, modified date and time, and access date
- and time are set to current DOS date and time.
-
-
-
- 3.2. Modifications affecting several functions.
-
- When Z80DOS detects a changed disk, it resets the disk system rather than
- aborting with a read-only error message as CP/M does.
-
- Files may be made "public" (available from all user areas on a disk) by
- setting the high bit of the second character of their filename (f2 bit).
- Public files cannot be referenced by wildcards. This feature is normally on,
- and may be turned off by setting bit 1 of address Z80DOS+19 to zero.
-
- Disks of up to one gigabyte and files of up to 32 megabytes are possible
- under Z80DOS.
-
- Z80DOS provides the user with more information when an error occurs. The
- type of error, the function call which produced the error, the drive letter,
- and the filename (if any) associated with the function call are all displayed.
-
-
- 3.3 Additional function calls.
-
- Z80DOS adds the following non-standard functions to CP/M:
-
-
- --- Function ---- -------------------- Description -----------------------
- No. --- Name ---
-
- 54 Get stamp Following a successful Open File, Search First, or Search
- Next call, retain the file's full 10 byte date and time
- stamp for future use, and return a pointer to the stamp in
- HL. If no stamps are present, store zeroes.
-
- 55 Use Stamp Use creation date and last modified date and time stored
- by Get Stamp instead of real time for the next Write, Make
- File or Close File call.
-
- 104 Set time Set the system time to the values pointed to by DE (BIOS
- dependent; see Z80DTIME.Z80 for format).
-
- 105 Get time Fill the five bytes pointed to by DE with the current date
- and time.
-
-
-
- 4. How does Z80DOS compare with some of the other BDOS replacements currently
- available?
-
- 4.1. Comparison of replacement disk operating systems for CP/M:
-
- Name | CP/M ZRDOS+ Z80DOS P2DOS21 DOS+25 SUPERDOS
- -------+-------------------------------------------------------------------
- Author | Digital Echelon, Carson H.A.J. C.B. Benjamin
- | Research, Inc. Wilson Ten Falconer Ho
- | Inc. Brugge
- |
- Deriv- | Unknown Unknown P2DOS, Unknown P2DOS P2DOS
- ation | SUPERDOS
- |
- Time | No No (*)C,U,A C,U C,U,A C,U
- stamps |
- |
- Disks | No Yes Yes No No Yes
- auto- |
- login |
- |
- Archive| No Yes Yes Yes Yes No
- |
- Public | No Public F2 F2 System F2
- files | user attribute attribute files attribute
- | areas at A0:
- |
- Get/Use| No No Yes No No No
- stamps |
- |
- Get/Set| No No Yes Yes Yes Yes
- time |
- |
- Error | Cryptic Clear Legible, Legible, Legible, Legible,
- messgs.| give give give give
- | function function function function
- | & file & file & file & file
- |
- Return | No Yes No No Yes No
- current|
- DMA |
- |
- Wheel- | No Yes No No No No
- protect|
- files |
- |
- Set/res| No Yes No No No No
- warm |
- boot |
- |
- Source | No No Yes Yes $50 Yes
- code |
- |
- Approx.| $20 $60 free free free free
- price +-----------------------------------------------------------------
- (*) C = Create, U = Update, A = Last Access
-
-
-
- 5. How do I install Z80DOS on my system?
-
- 5.1. Installing BDOS segment
-
- To install Z80DOS in your CP/M system, you will need:
-
- 1. A Z80 assembler
- 2. Digital Research's MOVCPM.COM, SYSGEN.COM, and DDT.COM or the
- equivalents
-
- You must first set the options and addresses in Z80DHDR.LIB to match your
- particular system and tastes. See instructions in Z80DHDR.LIB. Then you will
- need to assemble Z80DOS to a hex file. Finally, you will use SYSGEN.COM to
- overwrite the sections of the system tracks on your system diskettes which
- presently contain CP/M's BDOS with Z80DOS.
-
- If you are familiar with the process of patching your operating system
- with hex files, the file Z80DOS.BLD should give you enough information to
- install Z80DOS. If you have never before altered your operating system, you
- may want to consult one or more of the following references for more
- information before proceeding:
-
-
- Conn, Richard. Z3INSTAL.LBR. 132 kilobyte public domain library file
- describing Conn's Z80 Command Processor Replacement (ZCPR). Available on
- Z-Nodes worldwide.
-
- Conn, Richard. ZCPR3: The Manual. (New York: New York Zoetrope, Inc., 1985).
-
- Johnson-Laird, Andy. The Programmer's CP/M Handbook. (Berkeley:
- Osborne/McGraw-Hill, 1983).
-
- Miller, Alan R. Mastering CP/M. (Berkeley: SYBEX, Inc., 1983)
-
- Waite, Mitchell, and Robert Lafore. Soul of CP/M (How to Use the Hidden Power
- of Your CP/M System). (Indianapolis: Howard W. Sams & Co., 1983).
-
-
-
- 5.2. Installing BIOS segment (optional)
-
- To implement time stamping under Z80DOS, you will need in addition:
-
- 1. Source code for your BIOS
- 2. A real-time clock or four bytes of reserved RAM memory
-
- To implement time stamping, you will need to modify and reassemble your
- BIOS and overwrite your system tracks with the new BIOS using the techniques
- described in Z80DOS.BLD and in the above references. The offset at which to
- load the hex image of your BIOS is the same number used to load the hex image
- of Z80DOS in Z80DOS.BLD.
-
- You needn't have a real-time clock in your computer to implement date
- stamping, just an area of memory to hold the current date and time. BIOS.TIM
- includes an example BIOS time inserts which use memory to hold the time.
-
- Finally, before Z80DOS will do date and time stamping, you must run
- INITDIR.COM (included) on your disks. This sets aside extra space in your
- disk directories for time/date stamps (See Z80DPROG.NOT).
-
-
-
- 6. What do the programs in Z80DOS.LBR do?
-
- INITDIR.COM initializes directories for time stamping by clearing the fourth
- entry in each directory sector and flagging its user area byte with 21
- hex. This tells Z80DOS that this entry is to be used for holding the
- time and date stamps of the other three directory entries in the sector.
- See Z80DPROG.NOT for a complete description of the format used. For help
- using INITDIR.COM, type INITDIR.
-
- PPIP.COM is a public domain file copy utility which I have adapted for use
- with Z80DOS by enabling it to copy file date and time stamps along with
- files. PPIP has many useful options such as file archiving. For help
- with PPIP.COM, type PPIP or see PPIP.DOC, which is available in
- PPIPnn.LBR on many bulletin boards.
-
- SAVESTMP.COM is my own program which copies the creation date from one file to
- another. SAVESTMP is designed to bridge the gap between an advanced
- operating system which implements creation date file stamps and programs
- such as word processors which do not recognize time stamps. NewWord, for
- example, always erases the source file when modifications are performed,
- and in so doing loses the file's date of creation.
-
- To compensate for this, SAVESTMP can be used to save the original
- creation date by copying it to a zero-length file before editing and then
- restoring the creation date from the zero-length file after editing.
- This is best done using aliases under ZCPR, but could also be implemented
- with CP/M's SUBMIT.COM.
-
- Here is a simple sample ZCPR alias named MODIFY which implements this
- idea:
-
- MOD.IFY savestmp ROOT:DATEHOLD=$1;vde $1;savestmp $1=ROOT:DATEHOLD
-
- To edit a file, the user would type "MODIFY MYFILE". MYFILE's creation
- date would be copied to DATEHOLD (or any other file) prior to editing,
- then after editing, the creation date would be copied back to MYFILE.
- This ZCPR alias could be elaborated on with file existence checks, etc.
-
- Although I have tested SAVESTMP fully on my own system, it does make BIOS
- calls and writes directly to directory tracks, so please test
- SAVESTMP.COM on a dispensable diskette before using it extensively. My
- thanks to Rick Charnes, whose concern about lost creation dates inspired
- SAVESTMP.COM. For a brief help message, type SAVESTMP.
-
- TDIR.COM or "TIMEDIR.COM" is a directory utility which displays Z80DOS
- creation, modification, and last access stamps along with individual and
- total file size, number of files matched, and kilobytes free.
-
- TDIR will also display file attributes (such as read-only) using video
- display features when patched for your terminal. To patch TDIR, look for
- the ASCII labels "[VIDON>" and "[VIDOFF>" near the beginning of the file.
- After VIDON, you may patch in a string to turn a video attribute on (I
- use dim and reverse video on my system). A string to turn the attribute
- back off goes after VIDOFF. The strings may be up to 6 bytes long, but
- MUST be terminated with a dollar sign.
-
- TDIR is derived from DDIR, by H.A.J. Ten Brugge. For help with TDIR.COM,
- type "TDIR /".
-
- TELL.COM is a public domain utility which tells you information about your
- operating system. It is included for use in installing Z80DOS.COM. To
- use, just type TELL.
-
- TIME.COM sets or displays the date and time from the real-time clock or
- section of memory devoted to time storage on Z80DOS system. TIME.COM
- will only function once the proper BIOS routine has been installed.
- If you lack a real-time clock, you may wish to run TIME once each time
- you start your system, by using AUTO.COM on a CP/M system, or installing
- the TIME command in the STARTUP alias of a ZCPR system. For help, type
- TIME. TIME.COM was adapted from a program of the same name by C. B.
- Falconer.
-
- ZF10GD5.COM is for use on ZCPR systems only. This is the popular ZFILER
- program, modified by adding 31 bytes of code to copy Z80DOS date and time
- stamps when copying, moving, archiving, or unsqueezing files.
-
-
- 7. Acknowledgements
-
- The main body of Z80DOS is my adaptation of P2DOS, version 2.1, by H.A.J.
- Ten Brugge, Molenstraat 33, NL-7491 BD Delden, The Netherlands, all rights
- reserved. The date stamping format of Z80DOS and the programs TIME and
- INITDIR were adapted from DOS+, version 2.5, by C. B. Falconer, 680 Hartford
- Tpk, Hamden, CT 06517, all rights reserved. The method Z80DOS uses to
- automatically log in changed disks is an adaptation of the scheme presented by
- Benjamin Ho of Evanston, IL in his SUPERDOS.LBR.
-
-
-
- Please let me know what you think of Z80DOS. I will be happy to explain the
- goals and techniques of Z80DOS to programmers and developers or to assist
- anyone in adapting programs to Z80DOS.
-
-
- I can be reached thru messages to Carson Wilson at:
-
-
- Lillipute Z-Nodes, Chicago
- 312-664-1730 and 312-649-1730
- 8-1-No Parity 24 hours
-
-
- Best Wishes!
-