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
/
CPM3
/
CPM3SCB.LBR
/
BIOSFIX.MQC
/
BIOSFIX.MAC
Wrap
Text File
|
2000-06-30
|
2KB
|
78 lines
.z80
;For CP/M Plus Banked version only.
;
;A short patch program to fix the System Control Block BIOS jump
;vectors. This will cause all BIOS Warm boot, console I/O, and
;List output routines to be entered with bank 1 (TPA bank) in
;context. It will then be safe to implement RSXs that modify
;the BIOS jump vector to live below common base. BIOSFIX should
;be executed after a cold boot, but not within a submit file because
;CP/Ms GET RSX (which is attached to submit) modifies these same
;vectors, then restores them to their original values on completion.
;So you will have to remember to run BIOSFIX by hand at each cold
;boot. Refer to CPM3SCB.DOC for details of the SCB BIOS jump vectors.
;This short code sequence could also be implemented in an RSX that
;modifies the BIOS vectors.
;
;Jim Lopushinsky
;June 25, 1986
;Meadowlark RCP/M 403-435-6579
;
;To assemble and link:
; M80 =BIOSFIX
; L80 BIOSFIX,BIOSFIX/N/E
bdos equ 5
main:
ld c,12
call bdos ;get cpm version
ld a,l
cp 30h
jr nc,cpm3_ok
call ilprt
db 'BIOSFIX requires CP/M Plus',13,10,0
rst 0
cpm3_ok:
ld de,scbpb
ld c,49
call bdos ;get SCB address
ld l,0f9h ;point to common memory base
ld a,(hl)
inc l
or (hl) ;is it zero?
jr nz,bank_ok
call ilprt
db 'Banked version of CP/M Plus required',13,10,0
rst 0
bank_ok:
ld de,6 ;distance between vectors
ld l,68h ;offset to WBOOT vector
ld b,5 ;5 vectors
ld a,21h ;just a LD HL, inst
set_loop:
ld (hl),a ;modify the JP to LD HL,
add hl,de ;on to next vector
djnz set_loop ;loop for all vectors
call ilprt
db 'SCB BIOS jump table now fixed',13,10,0
rst 0
ilprt:
pop hl
ld a,(hl)
inc hl
push hl
or a
ret z
ld e,a
ld c,2
call bdos
jr ilprt
scbpb: db 3ah ;location of SCB address
db 0 ;get operation
end main