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
/
BDOS
/
P2DOS23.LBR
/
INSTALL.DZC
/
INSTALL.DOC
Wrap
Text File
|
2000-06-30
|
13KB
|
313 lines
P2DOS User's Guide
Release Version 2.3
15 February 1988
After extracting and uncrunching this library, in addition to this file,
you should have the following files:
---> DATE .COM CRC = 1D 32 Displays the current date
---> DATE .MAC CRC = E6 E4 Source for DATE.COM
---> DDIR .COM CRC = C7 45 Lists directory with time stamps
---> P2DOS .MAC CRC = BF 2A First of three P2DOS source files
---> P2DOS1 .MAC CRC = 31 B6 Second of three P2DOS source files
---> P2DOS2 .MAC CRC = 10 CD Third of three P2DOS source files
---> INITDIR .COM CRC = 74 E1 Initializes directory for time stamps
---> PUBLIC .COM CRC = 1B 71 Sets/resets the public file bit
---> PUBLIC .DOC CRC = 26 00 Documents PUBLIC.COM
---> PUBLIC .SRC CRC = 8E C3 Turbo Pascal source for PUBLIC.COM
---> SET .COM CRC = 04 44 Displays file/disk statistics
---> TOUCH .COM CRC = 9A DF Updates a file's time stamp
Installation Procedure:
1. Extract all files from P2DOS23.LBR onto a blank disk in drive B.
Uncrunch all type *.?z? files and erase the crunched versions.
2. Create a disk file containing your CP/M or ZCPR3 system image. Do
this by running SYSGEN as follows:
A>sysgen
SYSGEN VER 2.2
SOURCE DRIVE NAME (OR RETURN TO SKIP)a
SOURCE ON A, THEN TYPE RETURN<ret>
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)b
FUNCTION COMPLETE
This step serves two very important functions. First, the system
boot tracks on the disk in the B: drive are initialized. Second,
a complete image of the contents of the system tracks is left
in memory. Save the system track image for later use:
A>save x cpm.bin
x is size of your CP/M system in 256-byte "pages". If you are not
sure what this number is, try 50.
One important note; SYSGEN is a hardware/system dependent program.
Not to worry if the text above does not match your screen exactly.
3. Find the ultimate location of P2DOS and the point in CPM.BIN
where the P2DOS image is stored by using ZSID (or SID or DDT). Do
the following:
A>zsid cpm.bin
ZSID VERS 1.4
NEXT PC END
3300 0100 BCFF
#d0
0000: C3 03 ED BC 00 C3 00 BD .......
(There will be 12 lines printed at this point, but
the 0000 line contains what is important. The second
and third byte contain the location of the BIOS
warm boot entry point, which is exactly 0E03H above the
start of the BDOS. The BDOS jump no longer contains
the BDOS address because ZSID is now intercepting
BDOS calls. Now we will find the start of the BDOS and
your serial number.)
#ded03-e03
(ZSID will perform the subtraction for you, DDT will
not. In any case, the start of the BDOS will now be
displayed.)
DF00: SE RI AL NU MB ER C3 16 DF 94 E2 95 E2 AE E2 9A
(Again, there will be more lines, but the first line
contains all the important information. First, the
address on the left is the ultimate destination
of your P2DOS, the value for the DOSSTRT equate in
the source code. Second, the next six bytes are your
serial number. Note both DOSSTRT and your serial number
so you can include them in the source code. Now to
find the location of the BDOS image in CPM.BIN.)
#d1280
(Again, several lines will be displayed. Find the
one that exactly matches the line containing your
serial number. If it is not on the screen, repeat
the display command until you find a match.)
#d
12F0: 46 75 .....
1300: SE RI AL NU MB ER C3 16 DF 94 E2 95 E2 AE E2 9A
1310: E2 00 ....
(You may have to look around 1300H, but eventually,
you will find a line identical to the start of
the BDOS. Always use an address ending in 0 for the
display command. When you find the matching line,
the address at the left will be the point in CPM.BIN
where the image of the BDOS starts. Note this address,
which we'll call "image_location". We'll need this
address in step 6. You are temporarily done with ZSID.)
4. Now edit the source code to customize it to your tastes. The
file P2DOS.MAC contains all the customizing selections. The
other two files, P2DOS1.MAC and P2DOS2.MAC, do not need to
be changed unless you have special requirements (such as a
special location for the BDOS stack.)
Enter the start of P2DOS and the serial number into the source
code. Modify the assembly time options to suit your tastes
and assemble P2DOS.MAC to create a P2DOS.HEX file. The source
files are set up for M80 because it is one of the more difficult
assemblers to generate a proper .HEX file. For M80, the steps are:
A>b:
B>a:m80 =p2dos
B>a:l80 p2dos,p2dos/x/n/e
B>a:
Different assemblers will have different methods of generating
the P2DOS.HEX file, but all assemblers should be capable of making
such a file. Your will have to change the .Z80, ORG, ASEG,
.PHASE, and $INCLUDE statements to match the requirements of your
assembler. Many assemblers will just require the ORG statement set
to the ultimate P2DOS location.
5. Examine the P2DOS.HEX file and note two things on the first line:
the serial number and the load address of the serial number.
For M80, the load address was specified in the ORG statement in the
source code (100H). If you changed the org to match DOSSTRT
because that is what your assembler requires, then the DOSSTRT
address should appear on the first line. Note this load address,
which we'll call "linker_load_address", for use in step 6. For
example, if the .HEX file contains:
:20addr00serialnumberC316DF92E293E2ACE2......
:20012000AF327CEC327DECED738FE......
:2001400021ECFE29D02151.....
:
:
then you can see the load address in the 3rd through 6th digit and
the serial number in the 9th through 20th digit of the first line.
If you don't find your serial number on the first line, then the
assembler/linker didn't make a proper, useable hex file. Find out
what went wrong and make a new .HEX file.
6. Combine CPM.BIN and P2DOS.HEX using ZSID (or SID or DDT) as follows:
A>zsid cpm.bin
#>f<image_location> <image_location>+dff 0
(This zero-fills the old BDOS location. Check that
it worked by displaying the BDOS image. image_location
is from step 3.)
#d<image_location>
<image_location>: 00 00 00 00 ...
(Here we are using the image location found in step 3.
Now move in the new image.)
#ip2dos.hex
#r<image_location>-<linker_load_address>
(You may have to perform the subtraction yourself if you
are not using ZSID. linker_load_address is from step 5.)
#d<image_location>
<image_location>: SE RI AL NU MB ER C3 ....
(This completes the merge of the two files. Now save the
new operating system.)
#^c
A>save x p2dos.bin
(Here x is the same value you used to make CPM.BIN.)
7. You now have a copy of P2DOS in a file called P2DOS.BIN. Install it
on a few test disks by typing:
A>zsid p2dos.bin
#^c
A>sysgen
SYSGEN 2.2
SOURCE DRIVE NAME (OR RETURN TO SKIP):<ret>
DESTINATION DRIVE NAME (RETURN TO REBOOT):b
FUNCTION COMPLETE
Please note that SYSGEN is a system dependent program. The text
you see may not match exactly the text given here, but the
questions and answers should be the same.
8. Warm boot your system with P2DOS in A. If it boots correctly,
continue testing by copying files, running programs, until you are
satisfied that it works. Try this: Warm boot with P2DOS, PIP, and
a test file in A. Change the disk in B without hitting Control-C.
PIP the test file to B. No "Bdos Err on B: R/O"!
If your system hangs or goes completely nuts upon warm booting with
P2DOS, repeat the installation again.
USAGE
-----Changing Disks Without Control-C
P2DOS should work just like your old BDOS, quietly and out of your way.
It has some additional features which make it much nicer than your old BDOS.
For example, let's say you're writing the "Great American Novel" with
WordStar. It's late, you've written all day, and you want to move on to
other things. You hit ^K^D to save your work, and WordStar burps:
**Disk Full. Press <ESC>**
With your old BDOS, if you switched disks, you'd get
Bdos Err on A: R/O
and you'd say bye-bye to Chapter 5 unless you had a text recovery program.
With P2DOS, move to the beginning of file using ^R, not ^Q^R, and mark the
beginning of a block. Move to the end of file using ^C, not ^Q^C, and mark
the end of block. Hit ^K^W to write the block to disk. Enter a filename on a
drive not containing your novel (probably your WordStar disk). Remove the
disk from that drive, and insert a blank disk. Hit return, and your work will
be saved to a new disk. Finally, replace the old disk. Try this with your
old BDOS, and you'd be quite sorry.
P2DOS's "Control-C-less" operation is not limited to Wordstar. You may
change disks at any time, with any program, with one exception. IF A FILE IS
OPEN FOR WRITING, DO NOT CHANGE DISKS UNTIL THE FILE IS PROPERLY CLOSED. IF
YOU DO, YOU WILL TRASH YOUR DISKS! This is why, in the example above, we
changed the disk containing WordStar, not the disk containing the novel. No
files were open for writing on the Wordstar disk, so it was ok to change it.
The novel file was open, so its disk could not be changed.
-----Public Files
If you use user areas, you'll love this. Public files are files which are
accessible from all user areas. Normally, if Wordstar was in A7: and
your text files in A8:, you could not edit your files with Wordstar. If
Wordstar and its overlays were made public files, you could be logged into
A8:, B6:, or any other user area and still run Wordstar.
Public files are invisible to the use of wildcards, so you may not copy them
with PIP *.*. They must be specified by name. Public files are also
read-only, so they may not be erased.
To make a file PUBLIC, run the PUBLIC program which is included with P2DOS.
Ex: A>public ws.com
To restore a file to normal (make it private),
A>public ws.com x <---the X makes the file private.
----Error Messages
P2DOS may produce the following error messages:
Disk Error on A : error message
Function xx ; File = FILE.TYP
where the error message may be
Read error
Write error
Non existent drive
Read-Only (this happens only if disk was set to r/o with bdos function 28,
not when disks are changed.)
File is Read-only
The BDOS function number and the file involved (if applicable) are given, so a
full message may be:
Disk Error on A: Write error
Function 22 ; File = CHAPTER.5
In this case, there was a write-error trying to create file CHAPTER.5.
-----Advanced Features
P2DOS has optional built-in time stamp capabilities. To use time stamps, you
must have a real time clock and a bios routine which access the clock. You
must install P2DOS with DOTIME set to TRUE. You must also initialize
the directory for time stamps, using the INITDIR.COM program included
in the library. You will also find a directory display program, DDIR.COM,
that will display the time stamps.
P2DOS can be installed so that functions 13 and 37 allow the free
interchange of single and double sided disks. On many machines, such
as the Kaypro IV, changes between single and double sided disks are
recognized only at warm boots. Obviously, this is a limitation on the
switching of disks without Control-C. If your machine is one of these
and if you have the source to your bios, you can remove this limitation.
Add code to your bios to detect disk formats without warm booting.
Suppose this routine is DSKFMT. Change your BIOS jump table to:
:
:
SECTRN: JP TRANS ; existing sector translate
TIME: JP DOTIME ; get/set time
SETDSK: JP DSKFMT ; determine disk format
This code may not be necessary if your BIOS always knows the proper
disk type. However, if a different disk type is recoginzed only at
warm boot, this routine will need be added to recognize disk type
changes between warm boots.
This feature is extremely useful to have when using disk cataloging programs,
the file utility NSWP207, the library manager NULU 1.5, and many others
with which expect disk changes and call functions 13 and 37 to change
disks.
To my knowledge, all components of the P2DOS.LBR are public domain
for non-commerical use only. P2DOS23 is a modification of P2DOS21,
by H.A.J. Ten Brugge from the Netherlands. It is subject to the original
author's restrictions.
No liability is assumed. The code is beleived to be correct, but use
at your own risk.