2 CONST SEGMENT PUBLIC PARA 'DATA'
4 EXTRN BADVER:byte, BADDRV_ARG:word, INVPATH_ARG:word
6 EXTRN BADCD_ARG:word, BADSUBDIR:byte
7 EXTRN no_mem_arg:word ;an030;bgb
11 EXTRN OPNERR_ARG:word, NOEXT_ARG:word, EXTENT_ARG:word
14 EXTRN FILE_ARG1:WORD, FILE_ARG2:WORD
15 EXTRN badrw_num:word, BADRW_STR:WORD, BLOCK_NUM:WORD
16 EXTRN FATAL_ARG1:WORD, FATAL_ARG2:WORD
17 EXTRN FATmsg2:word ;an024;bgb
18 EXTRN BADSW_ARG:WORD, DSKSPC:WORD ;an049;bgb
19 EXTRN HIDMES:WORD, DIRMES:WORD, FILEMES:WORD, ORPHMES2:WORD
20 EXTRN ORPHMES3:WORD, BADSPC:WORD, FRESPC:WORD
21 EXTRN FREMEM:WORD, REPORT_ARG:WORD, CRLF_ARG:WORD
22 EXTRN RARG1:WORD, RARG3:WORD, ORPHCNT:WORD
23 EXTRN NO_NET_ARG:byte, MONTAB:BYTE, SubstErr:BYTE
24 EXTRN ExitStatus:Byte,Badr_Arg:Byte ;an000;bgb
25 EXTRN Sublist_msg_Idmes:word ;an000;bgb
26 extrn msgserialnumber:byte ;an000;bgb
27 extrn psp_segment:word ;an000;bgb;an034;bgb
39 PUBLIC PARSTR, DDOTENT, NUL, ERRSUB, SECONDPASS, ALLFILE
40 PUBLIC ORPHFCB, ORPHEXT, HIDCNT, HIDSIZ, FILCNT, FILSIZ, DIRCNT
41 PUBLIC DIRSIZ, DIRTYFAT, CROSSCNT, BADSIZ, ORPHSIZ, LCLUS
42 PUBLIC USERDIR, FRAGMENT, ALLDRV, FIXMFLG, DIRCHAR
43 PUBLIC BIGFAT, EOFVAL, BADVAL,CHAIN_END
45 PUBLIC temp_dd ;an049;bgb
47 DIRBUF LABEL BYTE ;Entry buffer for searches
48 VOLID DB -1,0,0,0,0,0,8 ;Volume ID FCB
49 VOLNAM DB 0,"???????????"
52 ALLFILE DB -1 ;Extended FCB indicator
53 DB 0,0,0,0,0 ;reserved bytes
54 DB 1EH ;attribute byte 0001-1110 hidden, system, label, subdir
55 ALLDRV DB 0 ;default drive
56 DB "???????????" ;any file name
59 ORPHFCB DB 0,"FILE0000"
63 fcb_copy db 32 dup (?)
67 pFileName DW ? ; pointer
69 ROOTSTR LABEL BYTE ;use this to change dir to the root
77 FIXMFLG DB 0 ;Flag for printing fixmes
78 ERRSUB DW 0 ;Flag for bad subdir error
79 FRAGMENT DB 0 ;Flag for extent processing
80 DIR_FIX DB 0 ;Flag for changing dir back to users'
81 DIRTYFAT DB 0 ;Dirty flag for FAT
83 ;note - all these fields that count allocation units can remain the same,
84 ; because the total au's are always less than 64k (1 word).
85 ; looks like the number of files and directories should change, though.
86 DIRCNT dd 0 ;# directories ;an049;bgb
87 DIRSIZ dw 0 ;# alloc units in dirs ;an049;bgb
88 FILCNT dd 0 ;# reg files
89 FILSIZ dw 0 ;# alloc units in reg files
90 HIDCNT dd 0 ;# hidden files
91 HIDSIZ dw 0 ;# alloc units in hid files
92 BADSIZ dw 0 ;# alloc units in bad sectors
93 ORPHSIZ dw 0 ;# alloc units in orphan files
94 LCLUS dw 0 ;# alloc units in lost clusters
95 DISPFLG DB 0 ;used by number routines
96 CROSSCNT dd 0 ;# crosslinked files (first pass)
97 ;end of display fields
99 temp_dd dd 0 ;temporary double word field for orphcnt;an049;bgb
100 SECONDPASS DB 0 ;Pass flag
101 HAVFIX DB 0 ;non zero if any fixes
102 DOFIX DB 0 ;flag for F switch
103 NOISY DB 0 ;flag for V switch
104 BIGFAT DB 0 ;0=12 bit FAT, NZ=16bit FAT
105 EOFVAL DW 0FF8H ;0FF8 for 12 bit FAT,0FFF8 for 16 bit
106 CHAIN_END DW 0FFFH ;0FFF for 12 bit FAT,0FFFF for 16 bit ;AN000;
107 BADVAL DW 0FF7H ;0FF7 for 12 bit FAT,0FFF7 for 16 bit
109 mon_name db 3 dup (?),0
111 USERDIR DB "\",0 ;Users current dir for drive
112 DB (DIRSTRLEN-1) DUP (?)
113 CONBUF DB 15,0 ;Input buffer
116 fTrunc DB FALSE ; TRUE => couldn't chdir, no freeing.
118 badread db " File allocation table bad",0
128 DATA SEGMENT PUBLIC PARA 'DATA'
129 PUBLIC THISDPB,DOTSNOGOOD,NUL_ARG,STACKLIM,ZEROTRUNC
130 PUBLIC NAMBUF,SRFCBPT,fatmap,ISCROSS,MCLUS,CSIZE,SSIZE
131 PUBLIC DSIZE,ARG1,ARG_BUF,ERRCNT,USERDEV,SECBUF
132 PUBLIC HARDCH,CONTCH,PATH_NAME,TMP_SPC,mem_size
133 public Read_Write_Relative,Transrc, fatcnt, fattbl_seg ;an000;bgb
134 public firstfat, fatsiz, secs_per_64k, paras_per_fat, sec_count ;an000;bgb
135 public firstsec ;an047;bgb
136 public dirsec ;an047;bgb
137 public root_entries ;an047;bgb
138 public paras_per_64k, save_drive ;an000;bgb
139 public sernum ;an000;bgb;an024;bgb
140 ifdef fsexec ;an038;bgb
141 public exec_path ;an038;bgb;an000;bgb;an027;bgb
142 public exec_block ;an038;bgb;an000;bgb;an027;bgb
143 public path_string ;an038;bgb;an000;bgb;an027;bgb
145 public end_of_fatmap ;an000;bgb;an030;bgb
146 public DBCS_VECTOR ;an055;bgb
147 public DBCS_VECTOR_off ;an055;bgb
148 public DBCS_VECTOR_seg ;an055;bgb
154 ifdef fsexec ;an038;bgb
155 Exec_Block Exec_Block_Parms <> ;an038;bgb;an027;bgb
156 EXEC_Path db 66 dup(0) ;an038;bgb;an027;bgb
157 ;These next two should stay togather ;an027;bgb
158 ; --------------------------------------- ;an027;bgb
159 Path_String db "PATH=" ; ;an027;bgb
160 Len_Path_String equ $ - Path_String ; ;an027;bgb;AN000;
161 ;---------------------------------------- ;an027;bgb
165 ;These should stay togather ;an027;bgb
166 ; --------------------------------------- ;an027;bgb
168 Search_Chkdsk db "KSDKHC" ; ;an027;bgb
169 Len_Search_Chkdsk equ $ - Search_Chkdsk ; ;an027;bgb
170 Search_Chkdsk_End equ $-1 ;an027;bgb
172 ;---------------------------------------- ;an027;bgb
173 save_drive db 0 ;determines whether drive specified is valid
174 firstfat dw 0 ;sector number of fat ;an005;bgb
175 firstsec dw 0 ;sector number of data area ;an047;bgb
176 dirsec dw 0 ;sector number of dir area ;an047;bgb
177 root_entries dw 0 ;number of entries in root dir ;an047;bgb
178 fattbl_seg dw 0 ;segment of the fat-table ;an005;bgb
179 sec_count dw 0 ;sectors / 64k
180 secs_per_64k dw 0 ;an005;bgb
181 paras_per_64k dw 0 ;an005;bgb
182 fatsiz dw 0 ;an005;bgb
183 paras_per_fat dw 0 ;an005;bgb
184 fatcnt db 2 ;number of fats on disk ;an005;bgb
185 HARDCH dd ? ;Pointer to real INT 24 handler
186 CONTCH DD ? ;Pointer to real INT 23 handler
187 THISDPB DD ? ;Pointer to drive DPB
188 USERDEV DB ? ;Users current device
189 CSIZE DB ? ;Sectors per cluster 1-256
190 SSIZE DW ? ;bytes per sector 1-64k
191 DSIZE DW ? ;# alloc units on disk
192 MCLUS DW ? ;DSIZE + 1
193 NAMBUF DB 14 DUP (?) ;Buffer
194 DOTSNOGOOD DB ? ;. or .. error flag
195 ZEROTRUNC DB ? ;Trimming flag
196 ISCROSS DB ? ;Crosslink flag
199 fatmap DW ? ;segment of fatmap table ;an005;bgb
200 end_of_fatmap dw ? ;last mem segment used ;an030;bgb
201 SECBUF DW ? ;Offset of sector buffer (in ram)
202 ERRCNT DB ? ;Used by FATread and write
203 PATH_NAME DB 128 DUP(0)
212 ; The following is used as a PRINTF buffer and also as the source/destination
215 ARG_BUF DB 256 DUP (?)
216 TMP_SPC DB 128 DUP (?)
221 ;;;TRANSRC DB "A:CON",0,0 ; Device so we don't hit the drive
222 TRANSRC DB "A:\",0,0 ; Device so we don't hit the drive
223 Read_Write_Relative Relative_Sector_Buffer <> ; ;AN000;
225 STACKLIM DW ? ;Stack growth limit
226 INTERNATVARS internat_block <>
227 DB (internat_block_max - ($ - INTERNATVARS)) DUP (?)
230 ; Structure for Get_Media_Id ;an024;bgb
231 SerNumBuf Label Byte ;AN000;S GENERIC_IOCTL buffer ;an024;bgb
232 dw 0 ;AN000;S Info level (set on input) ;an024;bgb
233 SerNum dd 0 ;AN000;S Serial # ;an024;bgb
234 db 11 DUP(' ') ;AN000;S Volume label ;an024;bgb
235 db 8 DUP(' ') ;AN000;S File system type ;an024;bgb
240 lastseg SEGMENT PUBLIC PARA 'LAST' ;an000;bgb
241 public fattbl ;an000;bgb
242 fattbl db 0 ;this is the last thing in the pgm ;an000;bgb;an005;bgb
243 lastseg ends ;this is where the fat is put in ram ;an000;bgb