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
Text File  |  2000-06-30  |  13KB  |  313 lines

  1.                              P2DOS User's Guide
  2.                              Release Version 2.3
  3.                                15 February 1988
  4.  
  5.  
  6. After extracting and uncrunching this library, in addition to this file,
  7. you should have the following files:
  8.  
  9. ---> DATE    .COM     CRC  =  1D 32    Displays the current date
  10. ---> DATE    .MAC     CRC  =  E6 E4    Source for DATE.COM
  11. ---> DDIR    .COM     CRC  =  C7 45    Lists directory with time stamps
  12. ---> P2DOS   .MAC     CRC  =  BF 2A    First of three P2DOS source files
  13. ---> P2DOS1  .MAC     CRC  =  31 B6    Second of three P2DOS source files
  14. ---> P2DOS2  .MAC     CRC  =  10 CD    Third of three P2DOS source files
  15. ---> INITDIR .COM     CRC  =  74 E1    Initializes directory for time stamps
  16. ---> PUBLIC  .COM     CRC  =  1B 71    Sets/resets the public file bit
  17. ---> PUBLIC  .DOC     CRC  =  26 00    Documents PUBLIC.COM
  18. ---> PUBLIC  .SRC     CRC  =  8E C3    Turbo Pascal source for PUBLIC.COM
  19. ---> SET     .COM     CRC  =  04 44    Displays file/disk statistics
  20. ---> TOUCH   .COM     CRC  =  9A DF    Updates a file's time stamp
  21.  
  22.  
  23. Installation Procedure:
  24.  
  25. 1.  Extract all files from P2DOS23.LBR onto a blank disk in drive B.
  26.     Uncrunch all type *.?z? files and erase the crunched versions.
  27.  
  28. 2.  Create a disk file containing your CP/M or ZCPR3 system image. Do
  29.     this by running SYSGEN as follows:
  30.  
  31.       A>sysgen
  32.       SYSGEN VER 2.2
  33.       SOURCE DRIVE NAME (OR RETURN TO SKIP)a
  34.       SOURCE ON A, THEN TYPE RETURN<ret>
  35.       FUNCTION COMPLETE
  36.       DESTINATION DRIVE NAME (OR RETURN TO REBOOT)b
  37.       FUNCTION COMPLETE
  38.  
  39.     This step serves two very important functions. First, the system
  40.     boot tracks on the disk in the B: drive are initialized. Second,
  41.     a complete image of the contents of the system tracks is left
  42.     in memory. Save the system track image for later use:
  43.  
  44.       A>save x cpm.bin
  45.  
  46.     x is size of your CP/M system in 256-byte "pages". If you are not
  47.     sure what this number is, try 50.
  48.  
  49.     One important note; SYSGEN is a hardware/system dependent program.
  50.     Not to worry if the text above does not match your screen exactly.
  51.  
  52. 3.  Find the ultimate location of P2DOS and the point in CPM.BIN
  53.     where the P2DOS image is stored by using ZSID (or SID or DDT). Do
  54.     the following:
  55.  
  56.     A>zsid cpm.bin    
  57.     ZSID VERS 1.4
  58.     NEXT  PC  END
  59.     3300 0100 BCFF
  60.     #d0
  61.     0000: C3 03 ED BC 00 C3 00 BD .......
  62.         (There will be 12 lines printed at this point, but
  63.         the 0000 line contains what is important. The second
  64.         and third byte contain the location of the BIOS
  65.         warm boot entry point, which is exactly 0E03H above the
  66.         start of the BDOS. The BDOS jump no longer contains
  67.         the BDOS address because ZSID is now intercepting 
  68.         BDOS calls. Now we will find the start of the BDOS and
  69.         your serial number.)
  70.     #ded03-e03
  71.         (ZSID will perform the subtraction for you, DDT will
  72.         not. In any case, the start of the BDOS will now be
  73.         displayed.)
  74.     DF00: SE RI AL NU MB ER C3 16 DF 94 E2 95 E2 AE E2 9A
  75.         (Again, there will be more lines, but the first line
  76.         contains all the important information. First, the
  77.         address on the left is the ultimate destination
  78.         of your P2DOS, the value for the DOSSTRT equate in
  79.         the source code. Second, the next six bytes are your
  80.         serial number. Note both DOSSTRT and your serial number
  81.         so you can include them in the source code. Now to
  82.         find the location of the BDOS image in CPM.BIN.)
  83.     #d1280
  84.         (Again, several lines will be displayed. Find the
  85.         one that exactly matches the line containing your
  86.         serial number. If it is not on the screen, repeat
  87.         the display command until you find a match.)
  88.     #d
  89.     12F0: 46 75 .....
  90.     1300: SE RI AL NU MB ER C3 16 DF 94 E2 95 E2 AE E2 9A
  91.     1310: E2 00 ....
  92.         (You may have to look around 1300H, but eventually,
  93.         you will find a line identical to the start of
  94.         the BDOS. Always use an address ending in 0 for the
  95.         display command. When you find the matching line,
  96.         the address at the left will be the point in CPM.BIN
  97.         where the image of the BDOS starts. Note this address,
  98.         which we'll call "image_location". We'll need this
  99.         address in step 6. You are temporarily done with ZSID.)
  100.  
  101. 4.  Now edit the source code to customize it to your tastes. The
  102.     file P2DOS.MAC contains all the customizing selections. The
  103.     other two files, P2DOS1.MAC and P2DOS2.MAC, do not need to
  104.     be changed unless you have special requirements (such as a
  105.     special location for the BDOS stack.)
  106.  
  107.     Enter the start of P2DOS and the serial number into the source
  108.     code. Modify the assembly time options to suit your tastes
  109.     and assemble P2DOS.MAC to create a P2DOS.HEX file. The source
  110.     files are set up for M80 because it is one of the more difficult
  111.     assemblers to generate a proper .HEX file. For M80, the steps are:
  112.  
  113.     A>b:
  114.     B>a:m80 =p2dos
  115.     B>a:l80 p2dos,p2dos/x/n/e
  116.     B>a:
  117.  
  118.     Different assemblers will have different methods of generating
  119.     the P2DOS.HEX file, but all assemblers should be capable of making
  120.     such a file. Your will have to change the .Z80, ORG, ASEG,
  121.     .PHASE, and $INCLUDE statements to match the requirements of your
  122.     assembler. Many assemblers will just require the ORG statement set
  123.     to the ultimate P2DOS location.
  124.  
  125. 5.  Examine the P2DOS.HEX file and note two things on the first line:
  126.     the serial number and the load address of the serial number.
  127.     For M80, the load address was specified in the ORG statement in the
  128.     source code (100H). If you changed the org to match DOSSTRT
  129.     because that is what your assembler requires, then the DOSSTRT
  130.     address should appear on the first line. Note this load address,
  131.     which we'll call "linker_load_address", for use in step 6. For
  132.     example, if the .HEX file contains:
  133.  
  134.     :20addr00serialnumberC316DF92E293E2ACE2......
  135.     :20012000AF327CEC327DECED738FE......
  136.     :2001400021ECFE29D02151.....
  137.     :
  138.     :
  139.  
  140.     then you can see the load address in the 3rd through 6th digit and
  141.     the serial number in the 9th through 20th digit of the first line.
  142.     If you don't find your serial number on the first line, then the
  143.     assembler/linker didn't make a proper, useable hex file. Find out
  144.     what went wrong and make a new .HEX file.
  145.  
  146. 6.  Combine CPM.BIN and P2DOS.HEX using ZSID (or SID or DDT) as follows:
  147.  
  148.     A>zsid cpm.bin
  149.     #>f<image_location> <image_location>+dff 0
  150.         (This zero-fills the old BDOS location. Check that
  151.         it worked by displaying the BDOS image. image_location
  152.         is from step 3.)
  153.     #d<image_location>
  154.     <image_location>: 00 00 00 00 ...
  155.         (Here we are using the image location found in step 3.
  156.         Now move in the new image.)
  157.     #ip2dos.hex
  158.     #r<image_location>-<linker_load_address>
  159.         (You may have to perform the subtraction yourself if you
  160.         are not using ZSID. linker_load_address is from step 5.)
  161.     #d<image_location>
  162.     <image_location>: SE RI AL NU MB ER C3 ....
  163.         (This completes the merge of the two files. Now save the
  164.         new operating system.)
  165.     #^c
  166.     A>save x p2dos.bin
  167.         (Here x is the same value you used to make CPM.BIN.)
  168.  
  169.  
  170. 7.  You now have a copy of P2DOS in a file called P2DOS.BIN. Install it
  171.     on a few test disks by typing:
  172.  
  173.     A>zsid p2dos.bin
  174.     #^c
  175.     A>sysgen
  176.     SYSGEN 2.2
  177.     SOURCE DRIVE NAME (OR RETURN TO SKIP):<ret>
  178.     DESTINATION DRIVE NAME (RETURN TO REBOOT):b
  179.     FUNCTION COMPLETE
  180.  
  181.     Please note that SYSGEN is a system dependent program. The text
  182.     you see may not match exactly the text given here, but the
  183.     questions and answers should be the same.
  184.  
  185. 8.  Warm boot your system with P2DOS in A. If it boots correctly,
  186.     continue testing by copying files, running programs, until you are
  187.     satisfied that it works. Try this: Warm boot with P2DOS, PIP, and
  188.     a test file in A. Change the disk in B without hitting Control-C.
  189.     PIP the test file to B. No "Bdos Err on B: R/O"!
  190.  
  191.     If your system hangs or goes completely nuts upon warm booting with
  192.     P2DOS, repeat the installation again.
  193.  
  194.  
  195. USAGE
  196.  
  197. -----Changing Disks Without Control-C
  198.  
  199. P2DOS should work just like your old BDOS, quietly and out of your way.
  200. It has some additional features which make it much nicer than your old BDOS.
  201.  
  202. For example, let's say you're writing the "Great American Novel" with
  203. WordStar. It's late, you've written all day, and you want to move on to
  204. other things. You hit ^K^D to save your work, and WordStar burps:
  205.                 **Disk Full. Press <ESC>**
  206.  
  207. With your old BDOS, if you switched disks, you'd get
  208.                 Bdos Err on A: R/O
  209. and you'd say bye-bye to Chapter 5 unless you had a text recovery program.
  210.  
  211. With P2DOS, move to the beginning of file using ^R, not ^Q^R, and mark the
  212. beginning of a block. Move to the end of file using ^C, not ^Q^C, and mark
  213. the end of block. Hit ^K^W to write the block to disk. Enter a filename on a
  214. drive not containing your novel (probably your WordStar disk). Remove the
  215. disk from that drive, and insert a blank disk. Hit return, and your work will
  216. be saved to a new disk. Finally, replace the old disk. Try this with your
  217. old BDOS, and you'd be quite sorry.
  218.  
  219. P2DOS's "Control-C-less" operation is not limited to Wordstar. You may
  220. change disks at any time, with any program, with one exception. IF A FILE IS
  221. OPEN FOR WRITING, DO NOT CHANGE DISKS UNTIL THE FILE IS PROPERLY CLOSED. IF
  222. YOU DO, YOU WILL TRASH YOUR DISKS!  This is why, in the example above, we
  223. changed the disk containing WordStar, not the disk containing the novel. No
  224. files were open for writing on the Wordstar disk, so it was ok to change it.
  225. The novel file was open, so its disk could not be changed.
  226.  
  227. -----Public Files
  228.  
  229. If you use user areas, you'll love this. Public files are files which are
  230. accessible from all user areas. Normally, if Wordstar was in A7: and
  231. your text files in A8:, you could not edit your files with Wordstar. If
  232. Wordstar and its overlays were made public files, you could be logged into
  233. A8:, B6:, or any other user area and still run Wordstar.
  234.  
  235. Public files are invisible to the use of wildcards, so you may not copy them
  236. with PIP *.*. They must be specified by name. Public files are also
  237. read-only, so they may not be erased.
  238.  
  239. To make a file PUBLIC, run the PUBLIC program which is included with P2DOS.
  240.  
  241. Ex: A>public ws.com
  242.  
  243. To restore a file to normal (make it private),
  244.     A>public ws.com x  <---the X makes the file private.
  245.  
  246. ----Error Messages
  247.  
  248. P2DOS may produce the following error messages:
  249.  
  250. Disk Error on A : error message
  251. Function xx ; File = FILE.TYP
  252.   where the error message may be
  253.  
  254. Read error
  255. Write error
  256. Non existent drive
  257. Read-Only (this happens only if disk was set to r/o with bdos function 28,
  258.            not when disks are changed.)
  259. File is Read-only
  260.  
  261. The BDOS function number and the file involved (if applicable) are given, so a
  262. full message may be:
  263.  
  264.         Disk Error on A: Write error
  265.         Function 22 ; File = CHAPTER.5
  266.  
  267. In this case, there was a write-error trying to create file CHAPTER.5.
  268.  
  269. -----Advanced Features
  270.  
  271. P2DOS has optional built-in time stamp capabilities. To use time stamps, you
  272. must have a real time clock and a bios routine which access the clock. You
  273. must install P2DOS with DOTIME set to TRUE. You must also initialize
  274. the directory for time stamps, using the INITDIR.COM program included
  275. in the library. You will also find a directory display program, DDIR.COM,
  276. that will display the time stamps.
  277.  
  278. P2DOS can be installed so that functions 13 and 37 allow the free
  279. interchange of single and double sided disks. On many machines, such
  280. as the Kaypro IV, changes between single and double sided disks are
  281. recognized only at warm boots. Obviously, this is a limitation on the
  282. switching of disks without Control-C. If your machine is one of these
  283. and if you have the source to your bios, you can remove this limitation.
  284. Add code to your bios to detect disk formats without warm booting.
  285. Suppose this routine is DSKFMT. Change your BIOS jump table to:
  286.  
  287.     :
  288.     :
  289. SECTRN:    JP    TRANS            ; existing sector translate
  290. TIME:    JP    DOTIME            ; get/set time
  291. SETDSK:    JP    DSKFMT            ; determine disk format
  292.  
  293.  
  294. This code may not be necessary if your BIOS always knows the proper
  295. disk type. However, if a different disk type is recoginzed only at
  296. warm boot, this routine will need be added to recognize disk type
  297. changes between warm boots.
  298.  
  299. This feature is extremely useful to have when using disk cataloging programs,
  300. the file utility NSWP207, the library manager NULU 1.5, and many others
  301. with which expect disk changes and call functions 13 and 37 to change
  302. disks.
  303.  
  304. To my knowledge, all components of the P2DOS.LBR are public domain
  305. for non-commerical use only. P2DOS23 is a modification of P2DOS21,
  306. by H.A.J. Ten Brugge from the Netherlands. It is subject to the original
  307. author's restrictions.
  308.  
  309. No liability is assumed. The code is beleived to be correct, but use
  310. at your own risk.
  311.  
  312.  
  313.