]>
wirehaze git hosting - MS-DOS.git/blob - v2.0/source/FORMES.ASM
14 CODE SEGMENT PUBLIC 'CODE'
15 ASSUME
CS:CODE,DS:CODE,ES:CODE
17 PUBLIC BADVER
,SNGMSG
,SNGDRV
,HRDMSG
,HRDDRV
,REPORT
18 PUBLIC LABPRMT
,TARGMSG
,TARGDRV
19 PUBLIC SYSTRAN
,CRLFMSG
,INVCHR
,INVDRV
,INVPAR
20 PUBLIC SYSMSG
,SYSDRV
,FRMTERR
,NOTSYS
,NOUSE
,MEMEX
22 EXTRN PRINT
:NEAR,CRLF
:NEAR,UNSCALE
:NEAR,DISP32BITS
:NEAR
23 EXTRN FDSKSIZ
:DWORD,SECSIZ
:WORD,CLUSSIZ
:WORD,SYSSIZ
:DWORD
28 MOV DX,OFFSET MORMSG
;Point to the message
29 CALL PRINT
;And print it
30 MOV AX,(STD_CON_INPUT_FLUSH
SHL 8) OR STD_CON_INPUT
31 ;Flush buffer and wait for keystroke
32 INT 21H
;Input character now a Y or N
33 AND AL,0DFH ;So lower case works too
44 ;*********************************************
45 ; Make a status report including the following information:
47 ; Total system area used
48 ; Total bad space allocated
49 ; Total data space available
51 ; The DISP32BITS routine prints the number in DI:SI followed
52 ; by the message pointed to by BX. If it is desired to print
53 ; a message before the number, point at the message with DX
57 MOV AX,WORD PTR FDSKSIZ
61 MOV WORD PTR FDSKSIZ
,AX
62 MOV WORD PTR FDSKSIZ
+2,DX
66 CALL DISP32BITS
;Report total disk space
67 MOV SI,WORD PTR SYSSIZ
68 MOV DI,WORD PTR SYSSIZ
+2
75 CALL DISP32BITS
;Report space used by system
77 MOV SI,WORD PTR BADSIZ
78 MOV DI,WORD PTR BADSIZ
+2
85 CALL DISP32BITS
;Report space used by bad sectors
87 MOV CX,WORD PTR FDSKSIZ
88 MOV BX,WORD PTR FDSKSIZ
+2
89 SUB CX,WORD PTR BADSIZ
90 SBB BX,WORD PTR BADSIZ
+2
91 SUB CX,WORD PTR SYSSIZ
92 SBB BX,WORD PTR SYSSIZ
+2
96 CALL DISP32BITS
;Report space left for user
100 BADVER
DB "Incorrect DOS version",13,10,"$"
101 SNGMSG
DB "Insert new diskette for drive "
102 SNGDRV
DB "x:",13,10,"and strike any key when ready$"
103 HRDMSG
DB "Press any key to begin formatting "
105 SYSTRAN
DB "System transferred",13,10,"$"
106 MORMSG
DB "Format another (Y/N)?$"
108 INVCHR
DB "Invalid characters in volume label",13,10,"$"
109 INVDRV
DB "Invalid drive specification$"
110 INVPAR
DB "Invalid parameter$"
111 TARGMSG
DB "Re-insert diskette for drive "
112 TARGDRV
DB "x:",13,10,"and strike any key when ready$"
113 SYSMSG
DB "Insert DOS disk in drive "
114 SYSDRV
DB "x:",13,10,"and strike any key when ready$"
115 FRMTERR
DB "Format failure",13,10,13,10,"$"
116 NOTSYS
DB "Disk unsuitable for system disk",13,10,"$"
117 NOUSE
DB "Track 0 bad - disk unusable",13,10,"$"
118 MEMEX
DB "Insufficient memory for system transfer",13,10,"$"
121 DSKSPC
DB " bytes total disk space",13,10,"$"
122 SYSSPC
DB " bytes used by system",13,10,"$"
123 BADSPC
DB " bytes in bad sectors",13,10,"$"
124 DATASPC
DB " bytes available on disk",13,10,13,10,"$"
128 ASGERR
DB "Cannot format an ASSIGNed drive. $"
131 LABPRMT
DB "Volume label (11 characters, ENTER for none)? $"