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
/
PROGRAMS
/
WSTAR
/
SAVESTAR.LBR
/
SAVEWS.ASM
< prev
next >
Wrap
Assembly Source File
|
2000-06-30
|
2KB
|
115 lines
; SAVESTAR.ASM by David Weinberger cf Profile Feb 1986 p. 48-54
;
boot equ 0000h
bdos equ 0005h
deletef equ 19
makef equ 22
writef equ 21
closef equ 16
ctrlZ equ 1AH
endfill equ 0000H
FFfill equ 00FFH
prnt equ 9
cr equ 13
lf equ 10
memax equ 00ECH
;
; Where text is stored in various programs: choose ONE
; cf Profile Feb 86 for more info
;
BEGTEXT equ 846DH ;WS v. 3.3
; BEGTEXT equ 802CH ;TURBO V. 2 with error msg.s
; GEBTEXT equ 7474h ;Turbo v. 2 without error msg.s
;
org 100h
lxi sp,stack
;
lxi d,sinon
mvi c,prnt
call bdos
;
lxi d,tfcb
mvi c,deletef
call bdos
;
lxi d,tfcb
mvi c,makef
call bdos
;
cpi 0FFh
jz fuldir
;
lxi h,begtext
mspot: push h
;
xchg
mvi c,1AH
call bdos
;
lxi d,tfcb
mvi c,writef
call bdos
;
cpi 0
jnz filled
;
pop h
mvi a,memax
cmp h
jz finis
;
lxi d,127
dad d
mov a,m
;
cpi ctrlz
jz finis
cpi endfill
jz finis
cpi FFfill
jz finis
;
inx h
jmp mspot
;
FINIS: lxi d,donemsg
mvi c,prnt
call bdos
;
clsf: lxi d,tfcb
mvi c,closef
call bdos
mvi c,boot
call bdos
;
filled: lxi d,fulldsk
mvi c,prnt
call bdos
;
jmp clsf
;
fuldir: lxi d,fuldr
mvi c,prnt
call bdos
;
mvi c,boot
call bdos
;
; MESSAGES:
;
sinon db 'SAVESTAR mini-version for WS3.3$'
donemsg db cr,lf,'==> Saved text written to B:-SAVED$'
fulldsk db 7,'++ Disk Full. Erase a file or use a new disk.'
db ' Try again ++',cr,lf,'$'
fuldr db 7,'++ Directory Full. Erase a file or use new disk.'
db ' Try again ++',cr,lf,'$'
; the 2 in tfcb causes -SAVED to be put on drive B:
; 1 would put it on A: and 0 for whichever drive your logged on.
tfcb db 2,'-SAVED ',0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0
ds 64
stack db 0
;
end your logged on.
tfcb db 2,'-SAVED ',0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,