From Newsgroup: comp.os.cpm
On Thu, 3 Sep 2026, John D. Baker wrote:
I'm just trying to reconcile the DRI example and the only
implementation(s) of it I know to exist versus the vast majority of implementations.
I finally found one (additional) example. There are a couple of deblocked BIOSes for Tarbell FDCs (and hard disk controllers) That implement the
HOME routine exactly as given in the DRI-issued patch:
https://deramp.com/downloads/digital_research/Software/CPM%202.2/CPM%20Patches/Patches/CPM22PAT.09
to wit:
;
;home - set up for home of drive to track 0
;
HOME: LDA HSTWRT ;check for pending write
ORA A
JRNZ HOME1
STA HSTACT ;host inactive
HOME1: LXI B,0 ;restore
;
;settrk - select track 0 - 76
;
SETTRK: SBCD SEKTRK
RET
The version implemented by the PCPI AppliCard BIOS does:
HOME: LDA HSTACT
ORA A
RZ ;return if host not active
LDA HSTWRT
ORA A
RNZ ;return if pending write
STA HSTACT ;mark host inactive
RET
which is only a slight deviation from the code in DEBLOCK.ASM.
The version I used in my GIDE BIOS extension for the Davidge DSB-4000
does:
Hhome: call chkhrd ;is it our disk?
jr z,Fhome ;no, let stock BIOS handle it
;
ld hl,hstact ;HL->host active flag
ld a,(hl) ;in A
or a ;set flagz
rz ;return if host inactive
inc hl ;bump to HSTWRT flag
ld a,(hl) ;in A
or a ;set flagz
rnz ;return if pending write
dec hl ;bump back to HSTACT
ld (hl),a ;mark inactive
ret ;and done
Hence the DRI-issued patch which clarifies that the routine
should continue with what you'd do in the non-deblocked case
rather than just RETurn.
Having seen these examples, I think I now should change it to:
Hhome: call chkhrd ;is it our disk?
jr z,Fhome ;no, let stock BIOS handle it
;
ld hl,hstact ;HL->host active flag
ld a,(hl) ;in A
or a ;set flagz
jr z,Hhomed ;brif host inactive
inc hl ;bump to HSTWRT flag
ld a,(hl) ;in A
or a ;set flagz
jr nz,Hhomed ;brif pending write
dec hl ;bump back to HSTACT
ld (hl),a ;mark inactive
Hhomed:
ld bc,0 ;track 0 in BC
jr Hsttrk0 ;go set it
Hsettrk:
call chkhrd ;is it our disk?
jr z,Fsettrk ;no, let stock BIOS handle it
;
Hsttrk0:
ld (sektrk),bc
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
--- Synchronet 3.22a-Linux NewsLink 1.2