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
/
22RSX
/
BYERSX.ARK
/
RSXINIT.BYE
< prev
next >
Wrap
Text File
|
1986-02-17
|
4KB
|
136 lines
; This RSXINIT.BYE should be renamed to "RSXINIT.INC" for assembly
subttl '-------initialization of BYERSX system--------'
;
; C.B. Falconer, 85/11/11
;
; Required routine
; Check run command parameters. Carry if not satisfactory
; This routine may parse values into storage as desired.
; If failure and carry set,
; then (de) must return a pointer to a help msg
; a,f,b,c,d,e,h,l (allowed)
chkparms:
ora a; clear carry, all well
ret
;
; Custom initialization. Required routine
; When this routine is reached the various bios vector copies
; (and patches if "driver" is true) have been made. This
; routine may alter the connectors in "biosv" to install new
; drivers, etc. The original routines are available thru
; "bsave" table. Remember that any routines connected MUST
; live in the retained portion of code, following "@keep"
; below, and I recommend putting their code in the "rsx" area.
; If "driver" is false any bios modifications made through
; this routine will only be available to applications calling
; the bios directly (through location 1), and not to BDOS.
; a,f,b,c,d,e,h,l allowed
init: lxi d,imsg
call tstr
; " "
; find the CCP command line location, and save it for chaining
lhld boot+1
xchg
lhld bdos+1
call chksys; worked before, must now
lxi d,-ccplgh
dad d
if zcpr2xc; ZCPR2 w/external command line
mvi l,0
shld dochn3+1; set ccp exec. line entry point
lxi h,@zcmd
shld dochn+1; set ccp cmd line location
else; NOT zcpr2xc, standard arrangement
shld dochn+1; save ccp cmd line & entry point
mvi l,0; for ccp entry point
shld dochn3+1; set ccp exec. line entry point
endif; NOT zcpr2xc
; " "
; Clear the uninitialized storage area, for defaults
lxi h,firstoclear
lxi b,countoclear
init1: mvi m,0; among other things this
inx h; clears remenbl
dcx b
mov a,b
ora c
jnz init1
; " "
if NOT oldlc; The buffer is labelled with size
mvi a,lcbufsz
sta lcbuff; mark the size available
endif
; " "
; Set some initial flags so that the system must be
; specifically armed by other programs.
call mdinit; init the comm module. Assume works
mvi a,defbaud; and default baud rate
call sgbaud; so terminal works immediately
; " "
; Now patch the bios entries to the dual console
lxi d,dcsta
mvi a,2
call apatch
lxi d,dcin; This are not in effect until
mvi a,3; remon is set true
call apatch
lxi d,dcout
mvi a,4
call apatch
lxi d,lout
mvi a,5
call apatch
lxi d,pout
mvi a,6
call apatch
lxi d,rin
mvi a,7
call apatch
lxi d,dsksel
mvi a,9
call apatch
lxi d,dskwrt
mvi a,14
call apatch
lxi d,lstat
mvi a,15
; " "
; Patch bios connector (a) to connect to (de). Note that
; the 0th connector is the cold boot entry (per DR standards).
; Also note that the first entry in biosv is entry # 1
; DO NOT patch connectors 0 or 1, nor any above "n22vecs"
; a,f
apatch: dcr a
dcr a
push h
mov l,a
add a
add l; *3
lxi h,biosv+4; offset past "jmp" opcode
add l
mov l,a
adc h
sub l
mov h,a
mov m,e
inx h
mov m,d
pop h
ret
;
; This message is displayed on system signon. Terminate with '$'
signon: db 'BYERSX by C.B. Falconer$'
;
; This routine MUST be supplied. Normally just returns. It is
; called only when the RSX is found to be already installed. If
; it returns the RSX will be brought down. This may control the
; pre-installed RSX, and exit with "jmp boot". When called the
; "ckparms" routine has already been executed, but "init" has
; not (and will not be called)
; a,f,b,c,d,e,h,l (allowed)
killhk: jmp mdquit; remove any interrupt system
;
; This message only used above in init. Optional. Last item in
; this file, so can easily be patched.
imsg: db ' installing $'
: