Date : Thu, 31 Jan 1985 12:38:42 PST (Thu)
From : Bridger Mitchell <bridger@Rand-Unix.ARPA>
Subject: Re: PUBPATCH and "swiped files"
PUBPATCH *MUST* be installed on a STANDARD cp/m 2.2 bdos!
Jan Steinman and Paul Kelley have both reported similar problems--
files disappearing from the disk directory following the first
directory entry with 'E5' in byte 0.
Paul's problem was that his Heath CP/M 2.2.03 was *NOT* a standard
cp/m 2.2 bdos. It contained this patch, abstracted by Paul:
;Patch at BDOS+0DEEH - End of BDOS
;Come here from GETALOC when first byte marked erased
;Speeds up allocation calculation
PATCH: INX H ;look at second byte
CMP M
JNZ GETA1 ;if not erase mark, assume file entry
; and continue checking directory
RET ;else assume we have found the region of
; the directory not changed since formatting
; and quit checking
**************************
As we said in Dr. Dobbs, and in the PUBPATCH.ASM source, PUBPATCH
patch must be installed in a *COMPLETELY STANDARD CP/M 2.2 BDOS!*
**************************
Please recheck your bdos. In the Heath case, Paul's version looked
like this:
Fragment from STANDARD BDOS2.2 routine to get the allocation vector
;
GETA1: MVI C,0FFH ;set the exit code
CALL NXTDIR ;set the next directory pointers
CALL CHKCNT ;was there one?
RZ ;return if not
CALL PNTDIR ;point to the right spot
;HL now points to first byte of directory entry in DIRBUF
MVI A,DELDAT ;get the file deleted mark
CMP M ;is this what we see?
JZ GETA1 ;keep looking for a nonempty block
LDA USRCOD ;get the user byte
CMP M ;test this against the first byte
JNZ GETA2 ;if we don't match mark this block
;Fragment from HEATH BDOS2.2 routine to get the allocation vector
;
GETA1: MVI C,0FFH ;set the exit code
CALL NXTDIR ;set the next directory pointers
CALL CHKCNT ;was there one?
RZ ;return if not
CALL PNTDIR ;point to the right spot
;HL now points to first byte of directory entry in DIRBUF
MVI A,DELDAT ;get the file deleted mark
CMP M ;is this what we see?
---> JZ PATCH ;TEST FOR FORMAT AREA
LDA USRCOD ;get the user byte
CMP M ;test this against the first byte
JNZ GETA2 ;if we don't match mark this block
Jan: Please let me know if this is, in fact, the source of your
problem.
info-cpm list:
The Heath code seems risky to me: Anyone who, e.g., uses
DU to clear a bad directory entry to E5's will end up
unwittingly wiping out the rest of his directory.
--bridger mitchell