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
/
ZCPR33
/
A-R
/
ERR11.LBR
/
ERR.ZZ0
/
ERR.Z80
Wrap
Text File
|
2000-06-30
|
3KB
|
187 lines
;PROGRAM TO GIVE SOFT ERROR COUNT SINCE LAST COLD BOOT ON
;HEATH/ZENITH H37 AND H17 DRIVES RUNNING UNDER CPM 2.2.02,
;2.2.03 AND 2.2.04 FOR H/Z 89/90
;
;Original author--unknown
;Changed to Z80 code and modified to run under NZCOM--Biff Bueffel--11/88
;
false equ 0
true equ not false
;****************************************************************************
;*********SET NZCOM AND DRIVE EQUATES APPROPRIATELY BEFORE ASSEMBLY**********
;****************************************************************************
NZCOM equ true ;only needs to be false if using hard coded ZCPR3 *
NZBIO equ 900H ;size of nzcom virtual bios *
H17 equ true ;set to true if using H17 drives *
H37 equ true ;set to true if using H37 drives *
VERMSG equ true ;print CPM version message *
;****************************************************************************
tpa equ 100H ;start of program area
;
cr equ 0DH
lf equ 0aH
conout equ 2
pstring equ 9
bdos equ 5
;
z3env equ 0fe00h ;for debugging purposes only
;
org tpa
jp start
db 'Z3ENV'
db 1 ;type 1 enviroment
z3eadr dw z3env ;Z3ENV address
;
db 'nzcom->'
nzcomt: db nzcom
db 'nzbio->'
nzbioz: dw nzbio
db 'h17->'
h17t: db h17
db 'h37->'
h37t: db h37
db 'vermsg->'
vmsgt: db vermsg
;
start: ld hl,0
add hl,sp
ld sp,stack
push hl
ld de,crlf
ld c,pstring
call bdos
ld hl,(1)
call nzb
ld de,33h-3
add hl,de
ld a,(hl)
ld (vers),a
;
ld a,(vmsgt) ;get vermsg indicator
cp 0 ;see if false
jr z,h17a ;if so skip this
ld de,msgver ;prints cpm version message
ld c,pstring
call bdos
ld a,(vers)
add '0'
ld e,a
ld c,conout
call bdos
ld de,crlf
ld c,pstring
call bdos
;
h17a: ld a,(h17t)
cp 0
jr z,h37a
ld a,(vers)
cp 2
jr z,vers2
cp 3
jr z,vers3
vers4: ld hl,(1)
call nzb
ld de,4dh-3
jr pr17
vers3: ld hl,(1)
call nzb
ld de,49h-3
jr pr17
vers2: ld hl,(1)
call nzb
ld de,4ch-3
pr17: add hl,de
ld e,(hl)
inc hl
ld d,(hl)
ex de,hl
call decout
ld de,msg1
ld c,pstring
call bdos
;
h37a: ld a,(h37t)
cp 0
jr z,exit
;
ld a,(vers)
cp 2
jr z,exit
cp 3
jr z,ver3
ver4: ld hl,(1)
call nzb
ld de,4Fh-3
jr pr37
ver3: ld hl,(1)
call nzb
ld de,4bh-3
pr37: add hl,de
ld e,(hl)
inc hl
ld d,(hl)
ex de,hl
call decout
ld de,msg2
ld c,pstring
call bdos
;
;
;
exit:
pop hl
ld sp,hl
ret
;
nzb: ;Routine to get "real" warm boot vector in real bios
ld a,(nzcomt) ;see if nzcom configuration
cp 0 ;if not nzcom then return
ret z
ld a,(tpa+10) ;get z3env default high byte into register a
cp 0feh ;z3env high byte value
ret z ;if not nzcom is standard cpm
ld de,nzbio ;offset from nzcom bios to real bios
add hl,de ;add to nzcom warm boot vector
ret
;
decout: push bc
push de
push hl
ld bc,-10
ld de,-1
dx: add hl,bc
inc de
jr c,dx
ld bc,10
add hl,bc
ex de,hl
ld a,h
or l
call nz,decout
ld a,e
add '0'
ld e,a
ld c,conout
call bdos
pop hl
pop de
pop bc
ret
;
vers db 0
;
msgver: db 'CP/M Version 2.2.0','$'
;
msg1: db ' H17 Soft Disk Errors',cr,lf,'$'
;
msg2: db ' H37 Soft Disk Errors',cr,lf
;
db 'since last Cold Boot.',cr,lf,'$'
crlf: db cr,lf,'$'
;
ds 64
stack ds 0
end start