home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
programs
/
list
/
enspol10.lbr
/
RSXINIT.EQP
/
RSXINIT.ESP
Wrap
Text File
|
1986-12-14
|
3KB
|
93 lines
; rename this RSXINIT.ESP to RSXINIT.INC for assembly with RSXMAST
subttl 'ENSPOOL initialization, non-resident portion'
;
; Initialization for ENSPOOL printer spooler system
; This contains the minimum needed for an RSX system. All the
; routines in the system are available. Part of the RSX system
; C.B. Falconer, 85/9/24
;
; 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.
;
; If ENSPOOL running, exit. Otherwise create the specified file.
; a,f,b,c,d,e,h,l (allowed)
chkparms:
lxi d,0
mvi a,@RSX
call dos
ora a
rnz; active, killhk will deal
sta buff; mark output buffer empty
lda tfcb1+1
cpi ' '
stc
lxi d,help
rz; no file specified
mvi e,0ffh
mvi a,@USR
call dos
sta oldusr; save entry user value
lxi d,tfcb1
ldax d
ora a
jnz ckp1; a drive specified
mvi a,@CUR
call dos
inr a
stax d; else make specific
ckp1: mvi a,@DEL
call dos; delete any old
mvi a,@MAK
call dos; create new file
lxi d,makerr
inr a
stc
rz; file creation error
lxi d,tfcb1
lxi h,spfcb
mvi b,36
ckp2: ldax d; move the opened FCB into
mov m,a; retained memory
inx d
inx h
dcr b
jnz ckp2
ora a; clear any carry, all well
ret
;
makerr: db 'Unable to create output file$'
help: db 'ENSPOOL [d:]filename[.typ] '
db '(spools list output to file)$'
;
; Custom initialization.
; 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.
; This example only outputs a message
; a,f,b,c,d,e,h,l allowed
init: ret
;
; This message is displayed on system signon. Terminate with '$'
signon: db 'ENSPOOL v', ver / 10 +'0', '.', ver mod 10 + '0'
db ' by C.B. Falconer',cr,lf,'$'
;
; 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: mvi e,2
mvi a,@RSX
call dos; do the final flushing
ret