diff options
Diffstat (limited to 'v4.0/src/DOS/IFS.ASM')
| -rw-r--r-- | v4.0/src/DOS/IFS.ASM | 523 |
1 files changed, 523 insertions, 0 deletions
diff --git a/v4.0/src/DOS/IFS.ASM b/v4.0/src/DOS/IFS.ASM new file mode 100644 index 0000000..2893f28 --- /dev/null +++ b/v4.0/src/DOS/IFS.ASM | |||
| @@ -0,0 +1,523 @@ | |||
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | .xlist ;AN000; | ||
| 5 | include dosseg.asm ;AN000; | ||
| 6 | |||
| 7 | CODE SEGMENT BYTE PUBLIC 'CODE' ;AN000; | ||
| 8 | ASSUME CS:DOSGROUP, SS:DOSGROUP ;AN000; | ||
| 9 | .xcref ;AN000; | ||
| 10 | include dossym.inc ;AN000; | ||
| 11 | include devsym.inc ;AN000; | ||
| 12 | include doscntry.inc ;AN000; | ||
| 13 | .cref ;AN000; | ||
| 14 | .list | ||
| 15 | StackSize = 180h ; gross but effective | ||
| 16 | |||
| 17 | i_need VERFLG ; verify status flag ;AN000; | ||
| 18 | i_need CNTCFLAG ; break status flag ;AN000; | ||
| 19 | i_need CPSWFLAG ; CP switch logic ON/OFF ;AN000; | ||
| 20 | I_need CURRENTPDB,WORD ; Current process identifier ;AN000; | ||
| 21 | I_need HIGH_SECTOR,WORD ;AN000; | ||
| 22 | I_need BUF_HASH_COUNT,WORD ;AN000; | ||
| 23 | I_need FAILERR,WORD ;AN000; | ||
| 24 | I_need USER_ID,WORD ;AN000; | ||
| 25 | I_need CALLDEVAD,DWORD ; ;AN000; | ||
| 26 | I_need SYSINITVAR,WORD ;AN000; | ||
| 27 | I_need MYNAME,16 ; NetBIOS name ;AN000; | ||
| 28 | I_need RETRYCOUNT,WORD ; retry count ;AN000; | ||
| 29 | I_need COUNTRY_CDPG,BYTE ;AN000; | ||
| 30 | i_need DAY,BYTE ; date ;AN000; | ||
| 31 | i_need MONTH,BYTE ;AN000; | ||
| 32 | i_need YEAR,WORD ;AN000; | ||
| 33 | i_need CURBUF,DWORD ;AN000; | ||
| 34 | i_need IFS_DRIVER_ERR,WORD ;AN000; | ||
| 35 | i_need DOS34_FLAG,WORD ; IFS function Read/Write flag ;AN000; | ||
| 36 | i_need Callback_SS,WORD ; ;AN000; | ||
| 37 | i_need Callback_SP,WORD ;AN000; | ||
| 38 | i_need SaveBX,WORD ;AN000; | ||
| 39 | i_need Temp_Var,WORD ;AN000; | ||
| 40 | i_need INDOS,BYTE ;AN000; | ||
| 41 | i_need DskStack,BYTE ;AN000; | ||
| 42 | i_need IOStack,BYTE ;AN000; | ||
| 43 | i_need Callback_flag,BYTE ;AN000; | ||
| 44 | |||
| 45 | DOSINFO STRUC ;AN000; | ||
| 46 | bsize dw 0 ;AN000; | ||
| 47 | files dw 0 ;AN000; | ||
| 48 | fcbs1 dw 0 ;AN000; | ||
| 49 | fcbs2 dw 0 ;AN000; | ||
| 50 | buffers dw 0 ;AN000; | ||
| 51 | dw 0 ;AN000; | ||
| 52 | lastdrv dw 0 ;AN000; | ||
| 53 | secsize dw 0 ;AN000; | ||
| 54 | DosInfo ENDS ;AN000; | ||
| 55 | |||
| 56 | |||
| 57 | |||
| 58 | extrn ABSDRD:NEAR ;AN000; | ||
| 59 | extrn ABSDWRT:NEAR ;AN000; | ||
| 60 | extrn READTIME:NEAR ;AN000; | ||
| 61 | extrn CHECKFLUSH:NEAR ;AN000; | ||
| 62 | extrn GETCURHEAD:NEAR ;AN000; | ||
| 63 | |||
| 64 | |||
| 65 | ;****************************************************************************** | ||
| 66 | ; * | ||
| 67 | ; * MODULE: IFS_DOSCALL | ||
| 68 | ; * | ||
| 69 | ; * FUNCTION: IFS to DOS function request dispatcher | ||
| 70 | ; * | ||
| 71 | ; * FUNCTION: This procedure dispatches the IFS DOS service requests | ||
| 72 | ; * by calling various DOS service routines | ||
| 73 | ; * | ||
| 74 | ; * CALLING SEQUENCE: | ||
| 75 | ; * | ||
| 76 | ; * CALL DWORD PTR IFS_DOSCALL@ | ||
| 77 | ; * | ||
| 78 | ; * | ||
| 79 | ; * RETURN SEQUENCE: | ||
| 80 | ; * | ||
| 81 | ; * If AX = 0 No error | ||
| 82 | ; * | ||
| 83 | ; * If AX <> 0 Error | ||
| 84 | ; * AX = Error Code: | ||
| 85 | ; * | ||
| 86 | ; * | ||
| 87 | ; * INTERNAL REFERENCES: None | ||
| 88 | ; * | ||
| 89 | ; * | ||
| 90 | ; * EXTERNAL REFERENCES: STRATEGY, INTERRUPT, ABSDRD, ABSDWRT, | ||
| 91 | ; * FIND_SECTOR, MARK_SECTOR, WRITE_BUFFR, | ||
| 92 | ; * READ_BUFFR, WRITE_BUFFR, FREE_BUFFR, | ||
| 93 | ; * GET_DOS_INFO, FLUSH_BUFF | ||
| 94 | ; * | ||
| 95 | ; * NOTES: None | ||
| 96 | ; * | ||
| 97 | ; * REVISION HISTORY: New | ||
| 98 | ; * | ||
| 99 | ; * COPYRIGHT: "MS DOS IFS Function" | ||
| 100 | ; * "Version 1.00 (C) Copyright 1988 Microsoft Corporation" | ||
| 101 | ; * "Licensed Material - Program Property of Microsoft" | ||
| 102 | ; * | ||
| 103 | ; ************************************************************************* | ||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | PROCEDURE IFS_DOSCALL,FAR ;AN000; | ||
| 110 | assume DS:NOTHING,ES:NOTHING ;AN000; | ||
| 111 | |||
| 112 | CLI ; ;AN000; | ||
| 113 | CMP AH,39 ; ;AN000; | ||
| 114 | JNZ others ; ;AN000; | ||
| 115 | INC CS:[INDOS] ; in DOS ;AN000; | ||
| 116 | JMP Dosend ; ;AN000; | ||
| 117 | others: | ||
| 118 | CMP AH,40 ; ;AN000; | ||
| 119 | JNZ others2 ; ;AN000; | ||
| 120 | DEC CS:[INDOS] ; out DOS ;AN000; | ||
| 121 | JMP Dosend ; ;AN000; | ||
| 122 | others2: | ||
| 123 | CMP AH,38 ; ;AN000; | ||
| 124 | JNZ not_stack ; ;AN000; | ||
| 125 | PUSH CS ; ;AN000; | ||
| 126 | POP DS ; ;AN000; | ||
| 127 | MOV SI,OFFSET DOSGROUP:IOSTACK ;AN000; | ||
| 128 | MOV CX,stacksize ;AN000; | ||
| 129 | JMP Dosend ; ;AN000; | ||
| 130 | ; ;AN000; | ||
| 131 | not_stack: ; ;AN000; | ||
| 132 | MOV CS:[Temp_Var],DS; save ds for strcmp strcpy ;AN000; | ||
| 133 | PUSH CS ; ;AN000; | ||
| 134 | POP DS ; ;AN000; | ||
| 135 | assume DS:DOSGROUP ;AN000; | ||
| 136 | INC [INDOS] ; in DOS ;AN000; | ||
| 137 | PUSH CX ; save cx ;AN000; | ||
| 138 | PUSH DX ; save cx ;AN000; | ||
| 139 | MOV CX,SS ; cx=stack ;AN000; | ||
| 140 | MOV DX,CS ; cx=stack ;AN000; | ||
| 141 | CMP CX,DX ; dosgroup stack ? ;AN000; | ||
| 142 | POP DX ; save cx ;AN000; | ||
| 143 | POP CX ; restore cx ;AN000; | ||
| 144 | JZ withSS_SP ; yes ;AN000; | ||
| 145 | MOV [Callback_SS],SS ;save SS:SP ;AN000; | ||
| 146 | MOV [Callback_SP],SP ;AN000; | ||
| 147 | MOV [SaveBX],BX ; ;AN000; | ||
| 148 | MOV BX,CS ; prepare system stack ;AN000; | ||
| 149 | MOV SS,BX ; ;AN000; | ||
| 150 | MOV SP,OFFSET DOSGROUP:DSKSTACK ;AN000; | ||
| 151 | MOV BX,[SaveBX] ; ;AN000; | ||
| 152 | MOV [Callback_flag],1 ;set flag ;AN000; | ||
| 153 | withSS_SP: ; ;AN000; | ||
| 154 | STI ;AN000; | ||
| 155 | ASSUME DS:NOTHING ;AN000; | ||
| 156 | ; OR [DOS34_FLAG],Force_I24_Fail ;AN000; | ||
| 157 | ; ;AN000; | ||
| 158 | ; cmp ah,0 ; call Strategy routine ?? ;AN000; | ||
| 159 | ; jne dos_chk_ah1 ; jump if not ;AN000; | ||
| 160 | ; CALL STRATEGY ; else call strategy routine ;AN000; | ||
| 161 | ; jmp dos_exit ; then exit ;AN000; | ||
| 162 | ;AN000; | ||
| 163 | ;Dos_Chk_Ah1: ;AN000; | ||
| 164 | ; cmp ah,1 ; call interrupt routine ;AN000; | ||
| 165 | ; jne dos_chk_ah2 ; jump if not ;AN000; | ||
| 166 | ; CALL INTERRUPT ; else call interrupt routine ;AN000; | ||
| 167 | ; jmp dos_exit ; then exit ;AN000; | ||
| 168 | ;AN000; | ||
| 169 | ;Dos_Chk_Ah2: ;AN000; | ||
| 170 | ; cmp ah,4 ;AN000; | ||
| 171 | ; jae Dos_Chk_Ah8 ;AN000; | ||
| 172 | ; mov High_Sector,si ; save HI sector word ;AN000; | ||
| 173 | ; mov dx,di ; save low sector ;AN000; | ||
| 174 | ; push es ;AN000; | ||
| 175 | ; invoke FIND_DPB ; ds:si -> DPB ;AN000; | ||
| 176 | ; mov bp,si ;AN000; | ||
| 177 | ; push ds ;AN000; | ||
| 178 | ; pop es ; es:bp -> DPB ;AN000; | ||
| 179 | ; pop ds ; DS:BX-->Input buffer ;AN000; | ||
| 180 | ; | ||
| 181 | ; cmp ah,2 ; absolute read ?? ;AN000; | ||
| 182 | ; jne dos_chk_ah3 ; jump if not ;AN000; | ||
| 183 | ; | ||
| 184 | ; invoke DSKREAD ; else do absolute read ;AN000; | ||
| 185 | ; jmp dos_exit ; then return ;AN000; | ||
| 186 | |||
| 187 | ;Dos_Chk_Ah3: ;AN000; | ||
| 188 | ; invoke DSKWRITE ; do absolute write ;AN000; | ||
| 189 | ; jmp dos_exit ; then exit ;AN000; | ||
| 190 | |||
| 191 | |||
| 192 | |||
| 193 | Dos_chk_ah32: ;AN000; | ||
| 194 | cmp ah,32 | ||
| 195 | jne str_cmp ;AN000; | ||
| 196 | CALL GET_DOS_INFO ; else get DOS information ;AN000; | ||
| 197 | jmp SHORT dos_exit ;AN000; ;AN000; | ||
| 198 | str_cmp: ;AN000; | ||
| 199 | mov DS,[Temp_Var] ; restore DS ;AN000; | ||
| 200 | cmp ah,36 ;AN000; | ||
| 201 | jne str_cpy ;AN000; | ||
| 202 | invoke strcmp ; string compare ;AN000; | ||
| 203 | jmp SHORT dos_exit ;AN000; | ||
| 204 | str_cpy: ;AN000; | ||
| 205 | cmp ah,37 ;AN000; | ||
| 206 | jne dos_error ;AN000; | ||
| 207 | invoke strcpy ; string copy ;AN000; | ||
| 208 | jmp SHORT dos_exit ;AN000; | ||
| 209 | |||
| 210 | Dos_Error: ;AN000; | ||
| 211 | stc | ||
| 212 | ;AN000; | ||
| 213 | Dos_Exit: ;AN000; | ||
| 214 | CLI ;AN000; | ||
| 215 | PUSHF ;AN000; | ||
| 216 | AND [DOS34_FLAG],No_Force_I24_Fail ;AN000; | ||
| 217 | DEC [INDOS] ; exit DOS ;AN000; | ||
| 218 | CMP [Callback_flag],0 ;from dosgroup | ||
| 219 | JZ noSS_SP ;yes ;AN000; | ||
| 220 | MOV [Callback_flag],0 ; ;AN000; | ||
| 221 | POPF ;AN000; | ||
| 222 | MOV SP,CS:[Callback_SP]; ;AN000; | ||
| 223 | MOV SS,CS:[Callback_SS]; restore user's SS:SP ;AN000; | ||
| 224 | JMP SHORT DOSend ;AN000; | ||
| 225 | noSS_SP: ;AN000; | ||
| 226 | POPF | ||
| 227 | Dosend: | ||
| 228 | STI ; ;AN000; | ||
| 229 | |||
| 230 | ret ;return ;AN000; | ||
| 231 | |||
| 232 | |||
| 233 | ENDPROC IFS_DOSCALL ;AN000; | ||
| 234 | |||
| 235 | |||
| 236 | |||
| 237 | |||
| 238 | |||
| 239 | ; **************************************************************************** | ||
| 240 | ; * | ||
| 241 | ; * MODULE: STRATEGY | ||
| 242 | ; * | ||
| 243 | ; * FUNCTION: Call Strategy Routine | ||
| 244 | ; * | ||
| 245 | ; * FUNCTION: This procedure dispatches the IFS DOS service requests | ||
| 246 | ; * by calling various DOS service functions | ||
| 247 | ; * | ||
| 248 | ; * INPUT: ES:BX ---> Device Request Header | ||
| 249 | ; * AL = Drive # | ||
| 250 | ; * | ||
| 251 | ; * CALL STRATEGY | ||
| 252 | ; * | ||
| 253 | ; * OUTPUT: output of driver | ||
| 254 | ; * | ||
| 255 | ; * INTERNAL REFERENCES: None | ||
| 256 | ; * | ||
| 257 | ; * | ||
| 258 | ; * EXTERNAL REFERENCES: GETTHISDRV | ||
| 259 | ; * | ||
| 260 | ; * NOTES: None | ||
| 261 | ; * | ||
| 262 | ; * REVISION HISTORY: New | ||
| 263 | ; * | ||
| 264 | ; ************************************************************************* | ||
| 265 | |||
| 266 | ;PROCEDURE STRATEGY,NEAR ;AN000; | ||
| 267 | |||
| 268 | ; INVOKE FIND_DPB ; get DPB from drive number ;AN000; | ||
| 269 | ; ; DS:SI-->DPB for drive ;AN000; | ||
| 270 | ; LDS DI,DS:[SI.DPB_Driver_Addr] ; get driver addres from DPB ;AN000; | ||
| 271 | ; MOV DX,WORD PTR [DI.SDEVSTRAT] ;get strategy routine address;AN000; | ||
| 272 | ;Driver_Call: ;AN000; | ||
| 273 | ; MOV WORD PTR [CALLDEVAD],DX ; save it ;AN000; | ||
| 274 | ; MOV WORD PTR [CALLDEVAD+2],DS ; ;AN000; | ||
| 275 | ; CALL DWORD PTR [CALLDEVAD] ; call strategy routine ;AN000; | ||
| 276 | ;STRAT_Exit: ;AN000; | ||
| 277 | ; RET ; return ;AN000; | ||
| 278 | |||
| 279 | ;ENDPROC STRATEGY ;AN000; | ||
| 280 | |||
| 281 | |||
| 282 | |||
| 283 | |||
| 284 | |||
| 285 | |||
| 286 | |||
| 287 | |||
| 288 | ; **************************************************************************** | ||
| 289 | ; * | ||
| 290 | ; * MODULE: INTERRUPT | ||
| 291 | ; * | ||
| 292 | ; * FUNCTION: This procedure calls the interrupt routine of the drive | ||
| 293 | ; * specified in the drive#. | ||
| 294 | ; * | ||
| 295 | ; * INPUT: AL = Drive # | ||
| 296 | ; * | ||
| 297 | ; * | ||
| 298 | ; * OUTPUT: output of driver | ||
| 299 | ; * | ||
| 300 | ; * | ||
| 301 | ; * INTERNAL REFERENCES: None | ||
| 302 | ; * | ||
| 303 | ; * | ||
| 304 | ; * EXTERNAL REFERENCES: FIND_DPB | ||
| 305 | ; * | ||
| 306 | ; * NOTES: None | ||
| 307 | ; * | ||
| 308 | ; * REVISION HISTORY: New | ||
| 309 | ; * | ||
| 310 | ; ************************************************************************* | ||
| 311 | |||
| 312 | ;PROCEDURE INTERRUPT,NEAR ;AN000; | ||
| 313 | |||
| 314 | ; INVOKE FIND_DPB ; get DPB from drive number ;AN000; | ||
| 315 | ; LDS DI,DS:[SI.DPB_Driver_Addr] ; get driver addres from DPB ;AN000; | ||
| 316 | ; MOV DX,WORD PTR [DI.SDEVINT] ; get interrupt routine addrs;AN000; | ||
| 317 | ; JMP Driver_Call ;AN000; | ||
| 318 | |||
| 319 | ;ENDPROC INTERRUPT ;AN000; | ||
| 320 | |||
| 321 | |||
| 322 | |||
| 323 | |||
| 324 | |||
| 325 | |||
| 326 | |||
| 327 | |||
| 328 | ; ************************************************************************* * | ||
| 329 | ; * | ||
| 330 | ; * MODULE: Get_Dos_Info | ||
| 331 | ; * | ||
| 332 | ; * FUNCTION: Get DOS information | ||
| 333 | ; * | ||
| 334 | ; * INPUT: AL = Dos info code | ||
| 335 | ; * | ||
| 336 | ; * OUTPUT: Dos Information in registers | ||
| 337 | ; * | ||
| 338 | ; * INTERNAL REFERENCES: None | ||
| 339 | ; * | ||
| 340 | ; * | ||
| 341 | ; * EXTERNAL REFERENCES: READTIME, $GETEXTCNTRY | ||
| 342 | ; * | ||
| 343 | ; * NOTES: None | ||
| 344 | ; * | ||
| 345 | ; * REVISION HISTORY: New | ||
| 346 | ; * | ||
| 347 | ; ************************************************************************* | ||
| 348 | |||
| 349 | PROCEDURE GET_DOS_INFO,NEAR ;AN000; | ||
| 350 | |||
| 351 | cmp al,0 ; TIME and DATE ?? ;AN000; | ||
| 352 | jne chk_al1 ;AN000; | ||
| 353 | |||
| 354 | Invoke ReadTime ; get time in CX:DX ;AN000; | ||
| 355 | |||
| 356 | push cx ; save time ;AN000; | ||
| 357 | push dx ;AN000; | ||
| 358 | |||
| 359 | MOV CX,[YEAR] ;AN000; | ||
| 360 | ADD CX,1980 ;AN000; | ||
| 361 | MOV DX,WORD PTR [DAY] ; fetch both day and month ;AN000; | ||
| 362 | |||
| 363 | pop bx ; bh = seconds bl = hundredths ;AN000; | ||
| 364 | pop ax ; ah = hour al = minutes ;AN000; | ||
| 365 | ; cx = year dh = month ;AN000; | ||
| 366 | jmp get_info_exit ;AN000; | ||
| 367 | |||
| 368 | |||
| 369 | chk_al1: ; Active process info ?? ;AN000; | ||
| 370 | cmp al,1 ;AN000; | ||
| 371 | jne chk_al2 ; no, try next ;AN000; | ||
| 372 | MOV BX,[CurrentPDB] ; BX = active process ID ;AN000; | ||
| 373 | mov DX,[User_ID] ; User ID ;AN000; | ||
| 374 | jmp get_info_exit ; exit ;AN000; | ||
| 375 | |||
| 376 | |||
| 377 | chk_al2: ;AN000; | ||
| 378 | ; cmp al,2 ; get CPSW info ?? ;AN000; | ||
| 379 | ; jne chk_al3 ; jump if not ;AN000; | ||
| 380 | ; MOV SI,OFFSET DOSGROUP:COUNTRY_CDPG ;AN000; | ||
| 381 | ; MOV BX,[SI.ccDosCodePage] ; get dos code page id in BX ;AN000; | ||
| 382 | ; MOV DL,CPSWFLAG ; get CP Switch status ;AN000; | ||
| 383 | ; jmp get_info_exit ; exit ;AN000; | ||
| 384 | |||
| 385 | |||
| 386 | chk_al3: | ||
| 387 | ; cmp al,3 ; get CTRL BRK status ?? ;AN000; | ||
| 388 | ; jne chk_al4 ;AN000; | ||
| 389 | ; mov dl,CNTCFLAG ; DL = break status flag ;AN000; | ||
| 390 | ; jmp get_info_exit ; exit ;AN000; | ||
| 391 | |||
| 392 | |||
| 393 | chk_al4: | ||
| 394 | ; cmp al,4 ; get Verify status ?? ;AN000; | ||
| 395 | ; jne chk_al5 | ||
| 396 | ; mov dl,VERFLG ; DL = verify status flag ;AN000; | ||
| 397 | ; jmp get_info_exit ; exit ;AN000; | ||
| 398 | |||
| 399 | |||
| 400 | chk_al5: | ||
| 401 | cmp al,5 ; Config.sys info ?? ;AN000; | ||
| 402 | jne chk_al6 ;AN000; | ||
| 403 | |||
| 404 | mov si,OFFSET DOSGROUP:SYSINITVAR ; DS:SI-->SysInitVar ;AN000; | ||
| 405 | push ds ;AN000; | ||
| 406 | push si ;AN000; | ||
| 407 | lds si,[si].Sysi_SFT ; get SFT address ;AN000; | ||
| 408 | mov ax,[si].SFCount ; get number of files ;AN000; | ||
| 409 | lds si,[si].SFlink ; get next SFT table ;AN000; | ||
| 410 | cmp si,-1 ; end of table ;AN000; | ||
| 411 | jz nomore ; ;AN000; | ||
| 412 | add ax,[si].SFCount ; ;AN000; | ||
| 413 | nomore: ; ;AN000; | ||
| 414 | mov es:[di].files,ax ; save files= value ;AN000; | ||
| 415 | pop si ;AN000; | ||
| 416 | pop ds ;AN000; | ||
| 417 | mov ax,[si].Sysi_MaxSec ; get maximum sector size ;AN000; | ||
| 418 | mov es:[di].secsize,ax ; save files= value ;AN000; | ||
| 419 | mov ax,[si].Sysi_Keep ; ;AN000; | ||
| 420 | mov es:[di].fcbs2,ax ; ;AN000; | ||
| 421 | lds si,[si].Sysi_FCB ; get FCB address ;AN000; | ||
| 422 | mov ax,[si].SFCount ; get number of fcbs ;AN000; | ||
| 423 | mov es:[di].fcbs1,ax ; save fcbs= value ;AN000; | ||
| 424 | jmp get_info_exit ;AN000; | ||
| 425 | |||
| 426 | |||
| 427 | |||
| 428 | chk_al6: ;AN000; | ||
| 429 | cmp al,6 ; get machine name ?? ;AN000; | ||
| 430 | jne chk_al7 ; no, check next function ;AN000; | ||
| 431 | context DS ;AN000; | ||
| 432 | mov si,offset DOSGroup:MyName ; DS:SI-->name string ;AN000; | ||
| 433 | ; ES:DI-->return buffer ;AN000; | ||
| 434 | add di,2 ; skip max return size ;AN000; | ||
| 435 | mov cx,15 ; name size ;AN000; | ||
| 436 | Chk6_Loop: ;AN000; | ||
| 437 | rep movsb ; copy machine name to return buffer;AN000; | ||
| 438 | xor al,al ; set 16th byte is 0 ;AN000; | ||
| 439 | stosb ;AN000; | ||
| 440 | jmp get_info_exit ; return ;AN000; | ||
| 441 | ;AN000; | ||
| 442 | ;AN000; | ||
| 443 | Chk_Al7: ;AN000; | ||
| 444 | ; cmp al,7 ; get country information ?? ;AN000; | ||
| 445 | ; jne chk_al8 ; no, try next function ;AN000; | ||
| 446 | ; mov al,dl ; AL = info ID ;AN000; | ||
| 447 | ; mov bx,-1 ; select active code page ;AN000; | ||
| 448 | ; mov dx,-1 ; select active country ;AN000; | ||
| 449 | ; mov cx,-1 ; get all ;AN000; | ||
| 450 | ; INVOKE $getExtCntry ; get country info ;AN000; | ||
| 451 | ; jmp SHORT Get_Info_Exit ; exit ;AN000; | ||
| 452 | |||
| 453 | |||
| 454 | Chk_Al8: ;AN000; | ||
| 455 | cmp al,8 ; get share retry count ?? ;AN000; | ||
| 456 | jne bad_param ; no, Bad parameter ;AN000; | ||
| 457 | mov bx,RetryCount ; BX = Share retry count ;AN000; | ||
| 458 | jmp SHORT Get_Info_Exit ; exit ;AN000; | ||
| 459 | |||
| 460 | Bad_Param: ; Bad parameter ;AN000; | ||
| 461 | stc ; ;AN000; | ||
| 462 | |||
| 463 | Get_Info_Exit: ; exit ;AN000; | ||
| 464 | |||
| 465 | ret ;AN000; | ||
| 466 | |||
| 467 | |||
| 468 | ENDPROC GET_DOS_INFO ;AN000; | ||
| 469 | |||
| 470 | |||
| 471 | |||
| 472 | |||
| 473 | |||
| 474 | |||
| 475 | |||
| 476 | |||
| 477 | ; ************************************************************************* * | ||
| 478 | ; * | ||
| 479 | ; * MODULE: $IFS_IOCTL | ||
| 480 | ; * | ||
| 481 | ; * FUNCTION: Handle IFS Driver IOCTL calls | ||
| 482 | ; * | ||
| 483 | ; * INPUT: AH = 6B function code | ||
| 484 | ; * AL = XX 00 = Drive IOCTL, 01 = Psudo device IOCTL | ||
| 485 | ; * CX = 00 Reserved | ||
| 486 | ; * BL = XX Device Number | ||
| 487 | ; * DS:DX Pointer to Buffer | ||
| 488 | ; * | ||
| 489 | ; * OUTPUT: | ||
| 490 | ; * IF CARRY = 0 No Error | ||
| 491 | ; * IF CARRY = 1 Error | ||
| 492 | ; * AX = ERROR CODE | ||
| 493 | ; * | ||
| 494 | ; * INTERNAL REFERENCES: None | ||
| 495 | ; * | ||
| 496 | ; * | ||
| 497 | ; * EXTERNAL REFERENCES: INT 2F | ||
| 498 | ; * | ||
| 499 | ; * NOTES: None | ||
| 500 | ; * | ||
| 501 | ; * REVISION HISTORY: New | ||
| 502 | ; ************************************************************************* | ||
| 503 | |||
| 504 | PROCEDURE $IFS_IOCTL,NEAR ;AN000; | ||
| 505 | |||
| 506 | PUSH AX ;AN000; | ||
| 507 | MOV AX,(multnet SHL 8) OR 47 ; pass control to IFS Func ;AN000; | ||
| 508 | INT 2FH ;AN000; | ||
| 509 | POP BX ;AN000; | ||
| 510 | JC ABB_ERR ;AN000; | ||
| 511 | TRANSFER SYS_RET_OK ; return ;AN000; | ||
| 512 | |||
| 513 | ABB_ERR: ;AN000; | ||
| 514 | transfer SYS_RET_ERR ; error return ;AN000; | ||
| 515 | |||
| 516 | ENDPROC $IFS_IOCTL ;AN000; | ||
| 517 | |||
| 518 | |||
| 519 | |||
| 520 | CODE ENDS ;AN000; | ||
| 521 | END ;AN000; | ||
| 522 | |||
| 523 | |||