PUBLIC PATCH TO CP/M 2.2 This file contains the header to the assembly language file PUBPATCH.ASM which is contained in the Library. The files in the library are intended to support the article which appeared in Dr. Dobbs Journal, Nov 1984. The files are available for non commercial distribution as stated in the article. For a full explanation please read the article, Plu*Perfect Systems can not provide tutorial assistance for this material. ---------- ;11/18/84 minor change to published DDJ version to produce ;relocatable object file, to be relocated using HXRLOAD -- PUBPATCH -- A CP/M 2.2 BDOS modification to support the PUBlic filetype. -------------------------------------------- Copyright (c) 1984 -- All rights reserved. Plu*Perfect Systems P. O. Box 1494 Idyllwild CA 92349 -------------------------------------------- Attribute bit 2 of a filename signifies a PUBlic file, accessible by its unambiguous filename from all user numbers. PUBlic files are not accessible via the usual ambiguous filenames (e.g. *.* or ABC.D?F), to prevent unintentional erasure and avoid directory clutter. Directory entries for PUBlic files are, however, accessible via ambiguous filenames by using the BDOS search-for-first, search-for-next functions with a '?' in the drive-byte of the fcb. Extended versions of SD and DISK7 displays PUBlic files. To erase a PUBlic file, use "ERA unambiguous-filename". Or use DISK7. Or change it to a private file and then erase with a wildcard erase command. The PUBLIC.COM utility is available to make files either PUBlic or private and to list the current PUBlic files. If another utility is used to set the PUBlic attribute bit, avoid creating multiple files with the same name on the same drive, unless all of them are private. (PUBLIC.COM checks for this situation and prevents a conflict.) The REName command removes all attributes, so RENaming a PUBlic file will make it private, R/W, DIR in its original user number. --- TO INSTALL --- 1a. Determine the BIOSBASE address of your system in memory by subtracting 3 from the warm-boot address in memory: DDT L0 subtract 3 ==> BIOSBASE address 1b. Subtract 1600H to determine the CCPBASE_MEMORY address. 1c. Assemble PUBPATCH for these addresses. Either: use CDL's MACROIII assembler: MACROIII PUBPATCH A:DHK Or: convert the pseudo-opcodes to your assembler's pseudo-ops and assemble into a HEX file. e.g. .loc ==> org = ==> set =\ ==> ????, etc. 2. Create a system image for the SYSGEN operation. There are two ways to get the image: a. Either use SYSGEN to extract a system image from a disk in the usual manner -- SYSGEN source drive? A destination drive? SAVE pp ORIG.SYS. Use pp=50 pages or so to get the entire BIOS. b. Or generate a new system -- MOVCPM ss * where ss=64 for a 64K system, SAVE pp ORIG.SYS or whatever you are running. 3. Find the base address of the Command Processor in the image DDT ORIG.SYS Look for the command processor at 980H: You recognize it by two JMP instructions, followed by the command buffer (containing a Digital Research copyright notice, in the case of the original CCP): L980 D980 Call that address CCPBASE_IMAGE (normally 980H). (If you don't find it, you have a non-standard system, and your user's manual should have a memory map. See, e.g., the Compupro Disk 1 Controller manual, sec. 6.4). 4. Calculate the offset needed to cause the PUBPATCH.HEX file to load on top of the BDOS image. 'offset' will satisfy: CCPBASE_IMAGE = CCPBASE_MEMORY + offset 5. Create a new system image containing the patch: DDT ORIG.SYS IPUBPATCH.HEX Roffset G0 SAVE pp NEWSYS.SYS 6. Finally, put the new system on a FLOPPY disk for testing: SYSGEN NEWSYS.SYS destination_drive ------------------------------------------------ Code also corrects a CP/M 2.2 bug that caused Rename, Set Attribute, and Delete File functions to return 0 status on success instead of 0,1,2,3 per CP/M 2.2 Installation Guide. ------------------------------------------------ g a Digital Research copyr