home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
22rsx
/
rxmd.ark.2
/
RXMD03.MAC
< prev
next >
Wrap
Text File
|
1985-12-08
|
2KB
|
116 lines
;
; Check on what drive/user area the file(s) will go into
;
ducheck:
call logdu; Select drive/user for upload
lda prvtfl
ora a
rz; Not receiving to a private area
mvi a,gprdrv
call dorsx; Private area takes precedence
sui '@'; Convert to binary
sta fcb; Store drive to be used
ret
;
; Check for wheel status (or local operation).
; Z flag if restrictions apply, NZ for wheel status
; a,f
qwheel: call getstatus
ani whlbit+remon; IF whlbit OR NOT remon
xri remon; THEN unrestricted
ret
;
; Changes the name of certain type of files such a .COM to .OBJ, etc.
; Actions depend on the structure of "comtyp" table and systatus.
; Uses the fcblock FCB
; a,f,h,l
cktyp: call qwheel
rnz; Wheel, don't change file types
push d
call qtyp; returns pointer to replacement
jnc cktyp1; not found, no restrictions
call ilprt; Print renaming message
db 'Auto-renaming file to ".',0
lxi h,fcb+9; jam file type to de^
ldax d
mov m,a
call ctype; display new type
inx h
inx d
ldax d
mov m,a
call ctype
inx h
inx d
ldax d
mov m,a
call ctype
call ilprt
db '"',cr,lf,0
cktyp1: pop d
ret
;
; Check for restricted file types (in FCB). Carry if not found,
; else de points to replacement file type string.
; a,f,h,l,d,e
qtyp: lxi d,comtyp-5
; " "
; Entry to use table (de+5)^
; a,f,h,l,d,e
qtype: inx d
qtype1: inx d
qtype2: inx d
inx d
inx d
ldax d
ora a
rz; table end, exit with no carry
lxi h,fcb+9; Check filetype at FCB+9
ldax d; against table
inx d
cmp m
jnz qtype; not this
inx h
ldax d
inx d
cmp m
jnz qtype1; no match
inx h
ldax d
inx d
cmp m
jnz qtype2; no match
stc; signal no match
ret
;
; Some special filetypes, and their replacements
comtyp: db 'COM', 'OBJ'
db 'PRL', 'prl'
db 'SYS', 'sys'
db 'PCD', 'pcd'
db 0; table end marker
;
; Displays where file(s) will go, opens the file and shows the name
;
display:
call ilprt
db 'File will be received on ',0
call showdu
call crlf
lda actdrv
adi 'A'
call kshow; Show available space remaining
call crlf
call ilprt
db 'File open - ready to receive',cr,lf,0
lda bchflg
ora a
rnz; In batch mode now
mvi a,1; Show only on the local CRT
sta remoff
; " "
; Waiting message
waitms: call ilprt
db cr,lf,'Waiting.....',0
ret
1$