]>
wirehaze git hosting - MS-DOS.git/blob - v2.0/source/RECMES.ASM
15 ;The DOST: prefix is a DEC TOPS/20 directory prefix. Remove it for
16 ; assembly in MS-DOS assembly environments using MASM. The DOSSYM.ASM
17 ; file must exist though, it is included with OEM distribution.
24 const
segment public byte
27 data segment public byte
32 dg group
code,const
,data
37 code segment public byte
38 assume
cs:dg
,ds:dg
,es:dg
,ss:dg
40 EXTRN PCRLF
:NEAR,PRINT
:NEAR,INT_23
:NEAR,CONVERT
:NEAR
41 PUBLIC dskwrt
,dskrd
,DSKERR
,report
52 inc sp ;clean up stack
58 mov si,offset dg
: writing
71 inc sp ;clean up stack
77 mov si,offset dg
: reading
99 MOV DX,WORD PTR [DI+MESBAS
] ; Get pointer to error message
100 CALL PRINT
; Print error type
101 MOV DX,OFFSET DG
:ERRMES
105 MOV DX,OFFSET DG
:DRVMES
108 MOV DX,OFFSET DG
:REQUEST
110 MOV AX,(STD_CON_INPUT_FLUSH
SHL 8)+STD_CON_INPUT
111 INT 21H
; Get response
115 OR AL,20H
; Convert to lower case
125 OR AL,AL ; Resets zero flag
135 ;******************************************
136 ; Prints the XXX of YYY bytes recovered message.
137 ; The XXX value is a dword at di+16 on entry.
138 ; The YYY value is a dword (declared as a word) at filsiz.
140 ; If it is desired to print a message before the first number,
141 ; point at the message with DX and call PRINT.
144 mov si,[di+16] ;Get the XXX value
146 mov bx,offset dg
: ofmsg
147 call convert
;Print "XXX of " (DI:SI followed by message
149 mov si,filsiz
;Get the YYY value
151 mov bx,offset dg
: endmsg
152 call convert
;Print "YYY bytes recovered CR LF"
157 const
segment public byte
159 PUBLIC BADVER
,askmsg
,drvlet
,DRVLET1
,dirmsg
,recmsg_pre
160 PUBLIC crlf
,drverr
,baddrv
,opnerr
,recmsg_post
162 MESBAS
DW OFFSET DG
:ERR0
179 DRVMES
DB "ing drive "
180 DRVLET1
DB "A",13,10,"$"
181 REQUEST
DB "Abort, Retry, Ignore? $"
183 ERR0
DB "Write protect$"
186 ERR3
DB "Bad command$"
188 ERR5
DB "Bad call format$"
190 ERR7
DB "Non-DOS disk$"
191 ERR8
DB "Sector not found$"
193 ERR10
DB "Write fault$"
194 ERR11
DB "Read fault$"
197 ;-----------------------------------------------------------------------;
199 BADVER
DB "Incorrect DOS version"
201 askmsg db cr
,lf
,'Press any key to begin recovery of the'
202 db cr
,lf
,'file(s) on drive '
203 drvlet db 'A: ',cr
,lf
,cr
,lf
,'$'
204 dirmsg db cr
,lf
,'Warning - directory full',cr
,lf
,'$'
206 ;"recmsg_pre<number of files recovered>recmsg_post"
207 recmsg_post db ' file(s) recovered',cr
,lf
211 endmsg db ' bytes recovered',13,10,"$"
213 drverr db 'Invalid number of parameters$'
214 baddrv db 'Invalid drive or file name$'
215 opnerr db 'File not found$'