diff options
Diffstat (limited to 'v4.0/src/CMD/IFSFUNC/IFSERROR.ASM')
| -rw-r--r-- | v4.0/src/CMD/IFSFUNC/IFSERROR.ASM | 637 |
1 files changed, 637 insertions, 0 deletions
diff --git a/v4.0/src/CMD/IFSFUNC/IFSERROR.ASM b/v4.0/src/CMD/IFSFUNC/IFSERROR.ASM new file mode 100644 index 0000000..5240556 --- /dev/null +++ b/v4.0/src/CMD/IFSFUNC/IFSERROR.ASM | |||
| @@ -0,0 +1,637 @@ | |||
| 1 | PAGE ,132 ; ;AN000; | ||
| 2 | ; SCCSID = @(#)IFSERROR.INC 1.0 87/05/11 ;AN000; | ||
| 3 | TITLE IFSFUNC ERROR ROUTINES ;AN000; | ||
| 4 | NAME IFSERROR ;AN000; | ||
| 5 | ;************************************************************************************ ;AN000; | ||
| 6 | ; ;AN000; | ||
| 7 | ; IFS error Routines ;AN000; | ||
| 8 | ; ;AN000; | ||
| 9 | ; INT_2F_5 ;AN000; | ||
| 10 | ; ;AN000; | ||
| 11 | ; IFS_I24 ;AN000; | ||
| 12 | ; SET_EXTERR_INFO ;AN000; | ||
| 13 | ; PHONEY_DPB ;AN000; | ||
| 14 | ; ;AN000; | ||
| 15 | ; REVISION HISTORY: ;AN000; | ||
| 16 | ; Evolved from Network Redirector NETERROR: MAY 11 1987 ;AN000; | ||
| 17 | ; A000 - Original version 4.00 MAY 1987 ;AN000; | ||
| 18 | ; A001 - PTM 842 Messages | ||
| 19 | ; A002 - PTM 1602 INT 2f-5 interface ds bug RG 10/87 | ||
| 20 | ; A003 - PTM 1683/1769 error msg problems RG 10/87 | ||
| 21 | ; A004 - PTM 2827 error proc chgs RG 1/88 | ||
| 22 | ; A005 - PTM 4140 int 2f 5 interface change RMG 4/12/88 | ||
| 23 | ; A006 - P4789 message problems w/no ifs drivers loaded 5/18/88 RMG | ||
| 24 | ; A007 - P4962 I24 AH not set right for printer 5/24/88 RMG | ||
| 25 | ; A008 - P5030 I24 tempbuf conflict 6/03/88 RMG | ||
| 26 | ; ;AN000; | ||
| 27 | ; LOC - 167 ;AN000; | ||
| 28 | ; ;AN000; | ||
| 29 | ;************************************************************************************ ;AN000; | ||
| 30 | ;AN000; | ||
| 31 | .xlist ;AN000; | ||
| 32 | .xcref ;AN000; | ||
| 33 | INCLUDE IFSSYM.INC ;AN000; | ||
| 34 | INCLUDE IFSFSYM.INC ;AN000; | ||
| 35 | INCLUDE DOSSYM.INC ;AN000; | ||
| 36 | INCLUDE DEVSYM.INC ;AN000; | ||
| 37 | INCLUDE SYSMSG.INC | ||
| 38 | msg_utilname <IFSFUNC> | ||
| 39 | .cref ;AN000; | ||
| 40 | .list ;AN000; | ||
| 41 | ;AN000; | ||
| 42 | AsmVars <IBM, Installed, Debug> ;AN000; | ||
| 43 | ;AN000; | ||
| 44 | ; define the base code segment of the network support first ;AN000; | ||
| 45 | ;AN000; | ||
| 46 | IFSSEG SEGMENT BYTE PUBLIC 'IFSSEG' ;AN000; | ||
| 47 | IFSSEG ENDS ;AN000; | ||
| 48 | ;AN000; | ||
| 49 | ; include the rest of the segment definitions for normal MSDOS ;AN000; | ||
| 50 | ;AN000; | ||
| 51 | include dosseg.asm ;AN000; | ||
| 52 | ;AN000; | ||
| 53 | DATA SEGMENT WORD PUBLIC 'DATA' ;AN000; | ||
| 54 | ; DOSGROUP Data ;AN000; | ||
| 55 | Extrn THISDPB:DWORD ;AN000; | ||
| 56 | Extrn EXTERR:WORD ;AN000; | ||
| 57 | Extrn EXTERR_ACTION:BYTE ;AN000; | ||
| 58 | Extrn EXTERR_CLASS:BYTE ;AN000; | ||
| 59 | Extrn EXTERR_LOCUS:BYTE ;AN000; | ||
| 60 | Extrn ALLOWED:BYTE ;AN000; | ||
| 61 | Extrn ExitHold:DWORD ;AN000; | ||
| 62 | Extrn ERR_TABLE_21:BYTE | ||
| 63 | DATA ENDS ;AN000; | ||
| 64 | ;AN000; | ||
| 65 | IFSSEG SEGMENT BYTE PUBLIC 'IFSSEG' ;AN000; | ||
| 66 | ASSUME SS:DOSGROUP,CS:IFSSEG ;AN000; | ||
| 67 | ;AN000; | ||
| 68 | ; IFS Data ;AN000; | ||
| 69 | Extrn IFSDRV:BYTE ;AN000; | ||
| 70 | Extrn IFSR:WORD ;AN000; | ||
| 71 | Extrn TEMPBUF:BYTE ;AN003; | ||
| 72 | Extrn IFSPROC_FLAGS:WORD ;AN003; | ||
| 73 | Extrn SYSGetMsg:NEAR | ||
| 74 | Extrn IFSSEM:BYTE | ||
| 75 | Extrn THISIFS:DWORD ;AN006; | ||
| 76 | ;AN000; | ||
| 77 | ; Phoney DPB used by IFS Share/Lock errors ;AN000; | ||
| 78 | ;AN000; | ||
| 79 | DUMMY_DPB LABEL BYTE ;AN000; | ||
| 80 | DB 0 ; dpb_drive ;AN000; | ||
| 81 | DB 0 ; dpb_UNIT ;AN000; | ||
| 82 | DW 512 ; dpb_sector_size ;AN000; | ||
| 83 | DB 0 ; dpb_cluster_mask ;AN000; | ||
| 84 | DB 0 ; dpb_cluster_shift ;AN000; | ||
| 85 | DW 1 ; dpb_first_FAT ;AN000; | ||
| 86 | DB 1 ; dpb_FAT_count ;AN000; | ||
| 87 | DW 16 ; dpb_root_entries ;AN000; | ||
| 88 | DW 3 ; dpb_first_sector ;AN000; | ||
| 89 | DW 3 ; dpb_max_cluster ;AN000; | ||
| 90 | DB 1 ; dpb_FAT_size ;AN000; | ||
| 91 | DW 2 ; dpb_dir_sector ;AN000; | ||
| 92 | DD ? ; dpb_driver_addr ;AN000; | ||
| 93 | DB 0F8H ; dpb_media ;AN000; | ||
| 94 | DB -1 ; dpb_first_access ;AN000; | ||
| 95 | DW -1 ; dpb_next_dpb low ;AN000; | ||
| 96 | DW -1 ; dpb_next_dpb high ;AN000; | ||
| 97 | DW 0 ; dpb_next_free ;AN000; | ||
| 98 | DW -1 ; dpb_free_cnt ;AN000; | ||
| 99 | ;AN000; | ||
| 100 | ; Phoney device headers used by IFS INT 24H ;AN000; | ||
| 101 | ;AN000; | ||
| 102 | PHONEY_BLOCK LABEL BYTE ;AN000; | ||
| 103 | DD ? ; Pointer ;AN000; | ||
| 104 | DW ISNET ; Block net dev ;AN000; | ||
| 105 | DW ? ; Strat entry ;AN000; | ||
| 106 | DW ? ; Int entry ;AN000; | ||
| 107 | DB 8 DUP (0) ;AN000; | ||
| 108 | ;AN000; | ||
| 109 | PHONEY_DEVICE LABEL BYTE ;AN000; | ||
| 110 | DD ? ; Pointer ;AN000; | ||
| 111 | DW DEVTYP + ISNET ; Char net dev ;AN000; | ||
| 112 | DW ? ; Strat entry ;AN000; | ||
| 113 | DW ? ; Int entry ;AN000; | ||
| 114 | ;AN000; | ||
| 115 | PUBLIC PHONEY_NAME ;AN000; | ||
| 116 | PHONEY_NAME DB " " ;AN000; | ||
| 117 | ;AN000; | ||
| 118 | ;AN000; | ||
| 119 | NEXT_2F_5 DD ? ;AN000; | ||
| 120 | PUBLIC NEXT_2F_5 ;AN000; | ||
| 121 | ;AN000; | ||
| 122 | ; ;AN000; | ||
| 123 | ; ;AN000; | ||
| 124 | MAXERR EQU 89 ; Don't know errors above 79 ;AN000; | ||
| 125 | ;AN000; | ||
| 126 | PUBLIC RODS_LABEL | ||
| 127 | RODS_LABEL LABEL BYTE | ||
| 128 | .xcref ;AN000; | ||
| 129 | .xlist | ||
| 130 | MSG_SERVICES <IFSFUNC.CL1> | ||
| 131 | .cref ;AN000; | ||
| 132 | .list | ||
| 133 | |||
| 134 | ; | ||
| 135 | ; The following table defines CLASS ACTION and LOCUS info for the INT 21H/24H | ||
| 136 | ; errors. Each entry is 5 bytes long: | ||
| 137 | ; | ||
| 138 | ; Err#,Class,Action,Locus,Allowed_Val | ||
| 139 | ; | ||
| 140 | |||
| 141 | ERR_TABLE_IFS LABEL BYTE | ||
| 142 | DB errCLASS_BadFmt, errACT_User, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;50 ;AN003; | ||
| 143 | DB errCLASS_TempSit, errACT_DlyRet, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;51 ;AN003; | ||
| 144 | DB errCLASS_Already, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;52 ;AN003; | ||
| 145 | DB errCLASS_NotFnd, errACT_User, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;53 ;AN003; | ||
| 146 | DB errCLASS_TempSit, errACT_DlyRet, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;54 ;AN003; | ||
| 147 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;55 ;AN003; | ||
| 148 | DB errCLASS_OutRes, errACT_DlyRet, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;56 ;AN003; | ||
| 149 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;57 ;AN003; | ||
| 150 | DB errCLASS_BadFmt, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;58 ;AN003; | ||
| 151 | DB errCLASS_SysFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;59 ;AN003; | ||
| 152 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;60 ;AN003; | ||
| 153 | DB errCLASS_OutRes, errACT_DlyRet, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;61 ;AN003; | ||
| 154 | DB errCLASS_OutRes, errACT_DlyRet, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;62 ;AN003; | ||
| 155 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;63 ;AN003; | ||
| 156 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;64 ;AN003; | ||
| 157 | DB errCLASS_Auth, errACT_User, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;65 ;AN003; | ||
| 158 | DB errCLASS_BadFmt, errACT_User, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;66 ;AN003; | ||
| 159 | DB errCLASS_NotFnd, errACT_User, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;67 ;AN003; | ||
| 160 | DB errCLASS_OutRes, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;68 ;AN003; | ||
| 161 | DB errCLASS_OutRes, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;69 ;AN003; | ||
| 162 | DB errCLASS_TempSit, errACT_DlyRet, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;70 ;AN003; | ||
| 163 | DB errCLASS_BadFmt, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;71 ;AN003; | ||
| 164 | DB errCLASS_TempSit, errACT_Retry, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;72 ;AN003; | ||
| 165 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;73 ;AN003; | ||
| 166 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;74 ;AN003; | ||
| 167 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;75 ;AN003; | ||
| 168 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;76 ;AN003; | ||
| 169 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;77 ;AN003; | ||
| 170 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;78 ;AN003; | ||
| 171 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;79 ;AN003; | ||
| 172 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;80 ;AN003; | ||
| 173 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;81 ;AN003; | ||
| 174 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;82 ;AN003; | ||
| 175 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;83 ;AN003; | ||
| 176 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;84 ;AN003; | ||
| 177 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;85 ;AN003; | ||
| 178 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;86 ;AN003; | ||
| 179 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;87 ;AN003; | ||
| 180 | DB errCLASS_HrdFail, errACT_Abort, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;88 ;AN003; | ||
| 181 | DB errCLASS_Unk, errACT_Panic, errLOC_Disk, Allowed_FAIL+Allowed_RETRY ;?? ;AN003; | ||
| 182 | |||
| 183 | ; | ||
| 184 | ; We need to map old int 24 errors and device driver errors into the new set | ||
| 185 | ; of errors. The following table is indexed by the new errors | ||
| 186 | ; | ||
| 187 | ErrMap24 Label BYTE | ||
| 188 | DB error_write_protect ; 0 | ||
| 189 | DB error_bad_unit ; 1 | ||
| 190 | DB error_not_ready ; 2 | ||
| 191 | DB error_bad_command ; 3 | ||
| 192 | DB error_CRC ; 4 | ||
| 193 | DB error_bad_length ; 5 | ||
| 194 | DB error_Seek ; 6 | ||
| 195 | DB error_not_DOS_disk ; 7 | ||
| 196 | DB error_sector_not_found ; 8 | ||
| 197 | DB error_out_of_paper ; 9 | ||
| 198 | DB error_write_fault ; A | ||
| 199 | DB error_read_fault ; B | ||
| 200 | DB error_gen_failure ; C | ||
| 201 | DB error_gen_failure ; D RESERVED | ||
| 202 | DB error_gen_failure ; E RESERVED | ||
| 203 | DB error_wrong_disk ; F | ||
| 204 | |||
| 205 | ErrMap24End LABEL BYTE | ||
| 206 | |||
| 207 | |||
| 208 | BREAK <INT_2F_5 -- Routine for Extended error messages> | ||
| 209 | |||
| 210 | ;************************************************************************************ | ||
| 211 | ; | ||
| 212 | ; INT_2F_5 | ||
| 213 | ; | ||
| 214 | ; Called by: COMMAND.COM | ||
| 215 | ; | ||
| 216 | ; Routines called: CALL_IFS | ||
| 217 | ; | ||
| 218 | ; Input: [THISIFS] set | ||
| 219 | ; BX = extended error number ;AN005; | ||
| 220 | ; AL = component ID 0 - install check ;AN005; | ||
| 221 | ; 1 - command.com ;AN005; | ||
| 222 | ; 2 - message retriever ;AN005; | ||
| 223 | ; Function: | ||
| 224 | ; This handler uses 2F multiplex number 5. It allows the INT 24H | ||
| 225 | ; Handler in COMMAND to get message texts for NET extended errors. | ||
| 226 | ; | ||
| 227 | ; IF AH = 5 THEN | ||
| 228 | ; DO | ||
| 229 | ; IF AL < 0F8H THEN | ||
| 230 | ; DO | ||
| 231 | ; ³ IF AL .NE. 0 THEN | ||
| 232 | ; ³ DO | ||
| 233 | ; ³ ³ IF AL >= 50 .AND. AL <= 74 THEN /* or AL = 88 */ | ||
| 234 | ; ³ ³ DO | ||
| 235 | ; ³ ³ ³ Prep IFSRH below | ||
| 236 | ; ³ ³ ³ * IFSR_LENGTH DW 28 ; Request length | ||
| 237 | ; ³ ³ ³ * IFSR_FUNCTION DB 6 ; Get Criter Text | ||
| 238 | ; ³ ³ ³ *+ IFSR_RETCODE DB ? ; AL | ||
| 239 | ; ³ ³ ³ IFSR_RETCLASS DB ? | ||
| 240 | ; ³ ³ ³ IFSR_RESV1 DB 17 DUP(0) | ||
| 241 | ; ³ ³ ³ *+ IFSR_MSG@ DD ? ; Msg buffer address | ||
| 242 | ; ³ ³ ³ *+ IFSR_MSG_TYPE DB ? ; Msg type | ||
| 243 | ; ³ ³ ³ IFSR_RESV2 DB ? | ||
| 244 | ; ³ ³ ³ | ||
| 245 | ; ³ ³ ³ Call IFS specified in [THISIFS] | ||
| 246 | ; ³ ³ ³ IF IFSR_RETCODE = 0 THEN | ||
| 247 | ; ³ ³ ³ DO | ||
| 248 | ; ³ ³ ³ ES:DI = IFSR_MSG@ | ||
| 249 | ; ³ ³ ³ AL = IFSR_MSG_TYPE | ||
| 250 | ; ³ ³ ³ ENDDO | ||
| 251 | ; ³ ³ ³ ELSE get ifsfunc standard msg | ||
| 252 | ; ³ ³ ³ ENDIF | ||
| 253 | ; ³ ³ ³ RET 2 | ||
| 254 | ; ³ ³ ENDDO | ||
| 255 | ; ³ ³ ELSE RET 2 | ||
| 256 | ; ³ ³ ENDIF | ||
| 257 | ; ³ ENDDO | ||
| 258 | ; ³ ELSE DO | ||
| 259 | ; ³ AL = 0FFH /* install check */ | ||
| 260 | ; ³ iret | ||
| 261 | ; ³ ENDDO | ||
| 262 | ; ³ ENDIF | ||
| 263 | ; ENDDO | ||
| 264 | ; ELSE iret | ||
| 265 | ; ENDIF | ||
| 266 | ; ENDDO | ||
| 267 | ; ELSE jump far to [NEXT_2F_5] | ||
| 268 | ; ENDIF | ||
| 269 | ; | ||
| 270 | ; Output: carry clear - AL = msg type (0 or 1) | ||
| 271 | ; If EType is 1 then message is printed in form | ||
| 272 | ; <message> | ||
| 273 | ; Abort, Retry Ignore | ||
| 274 | ; If EType is 0 then message is printed in form | ||
| 275 | ; <message> error (read/writ)ing (drive/device) XXX | ||
| 276 | ; Abort, Retry Ignore | ||
| 277 | ; The message is ASCIZ and DOES NOT | ||
| 278 | ; include a trailing CR,LF | ||
| 279 | ; ES:DI -> message text | ||
| 280 | ; carry set - no message | ||
| 281 | ; | ||
| 282 | ; Notes: all destroyed | ||
| 283 | ; | ||
| 284 | ;************************************************************************************ | ||
| 285 | ;AN000; | ||
| 286 | procedure INT_2F_5,FAR ;AN000; | ||
| 287 | ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING ;AN000; | ||
| 288 | ;AN000; | ||
| 289 | ifsr_fcn_def CRITMSG ;AN000; | ||
| 290 | ;AN000; | ||
| 291 | CMP AH,5 ; check for IFS error 2F call ;AN000; | ||
| 292 | JZ I2F5_20 ;AN000; | ||
| 293 | JMP [NEXT_2F_5] ;AN000; | ||
| 294 | ;AN000; | ||
| 295 | I2F5_20: ; call ok ;AN000; | ||
| 296 | STI ; INTs OK ;AN000; | ||
| 297 | CMP AL,0F8H ;AN000; | ||
| 298 | JB I2F5_40 ;AN000; | ||
| 299 | IRET ; IRET on reserved functions ;AN000; | ||
| 300 | I2F5_40: ;AN000; | ||
| 301 | OR AL,AL ;AN000; | ||
| 302 | JNZ I2F5_60 ;AN000; | ||
| 303 | MOV AL,0FFH ; Tell Ellen I'm here ;AN000; | ||
| 304 | IRET ;AN000; | ||
| 305 | I2F5_60: ;AN000; | ||
| 306 | ;;;;;;;;CMP AL,error_NET_write_fault ; check for special error ;AN000; | ||
| 307 | ;;;;;;;;JE I2F5_80 ;AN000; | ||
| 308 | CMP BX,50 ;AC005; | ||
| 309 | JAE I2F5_70 | ||
| 310 | JMP I2F5_1000 ; Carry set ;AN000; | ||
| 311 | I2F5_70: | ||
| 312 | CMP BX,MAXERR ;AC005; | ||
| 313 | JBE I2F5_80 ;AN000; | ||
| 314 | I2F5_75: ;AN005; | ||
| 315 | STC ;AN000; | ||
| 316 | JMP I2F5_1000 ;AN000; | ||
| 317 | ;AN000; | ||
| 318 | I2F5_80: ;AN000; | ||
| 319 | CMP WORD PTR CS:[THISIFS+2],NULL_PTR ;if no ifs driver set, quit w/carry ;AN006; | ||
| 320 | JNE I2F5_85 ;AN006; | ||
| 321 | CMP WORD PTR CS:[THISIFS],NULL_PTR ;AN006; | ||
| 322 | JZ I2F5_75 ;AN006; | ||
| 323 | I2F5_85: ;AN006; | ||
| 324 | TEST CS:IFSSEM,MR_ERRMSG_SEM ; if already in msgret loop, exit fast ;AN005; | ||
| 325 | JNZ I2F5_75 ;AN005; | ||
| 326 | MOV CS:IFSPROC_FLAGS,0 ;AN005; | ||
| 327 | CMP AL,I2F5_MsgRet ;AN005; | ||
| 328 | JNE I2F5_90 ;AN005; | ||
| 329 | OR CS:IFSPROC_FLAGS,IsMsgRet ;AN005; | ||
| 330 | OR CS:IFSSEM,MR_ERRMSG_SEM ; set msgret error msg semaphore ;AN005; | ||
| 331 | I2F5_90: ;AN005; | ||
| 332 | SaveReg <DS,SI,BX,CS> ; save command.com regs ;AN002;AC003; | ||
| 333 | RestoreReg <DS> ; set ds-ifsseg ;AN002; | ||
| 334 | MOV AX,BX ; whole ax now ext error ;AN003;;AC005; | ||
| 335 | SaveReg <AX> ; save ext err # ;AN000; | ||
| 336 | invoke PREP_IFSR ; zero out ifsr, sets es:bx -> ifsr ;AN000; | ||
| 337 | MOV ES:[BX.IFSR_LENGTH],LENGTH_CRITMSG ;AN000; | ||
| 338 | MOV ES:[BX.IFSR_FUNCTION],IFSCRITMSG ;AN000; | ||
| 339 | MOV ES:[BX.IFSR_RETCODE],AX ;AN003; | ||
| 340 | |||
| 341 | ;*********************************************************************************************** | ||
| 342 | invoke CALL_IFS ; call ifs with chance to set errmsg ;AN000; | ||
| 343 | ;*********************************************************************************************** | ||
| 344 | |||
| 345 | JNC I2F5_200 ;AN000; | ||
| 346 | POP AX ; fs error set - get ifsfunc msg ;AN000; | ||
| 347 | TEST CS:IFSPROC_FLAGS,IsMsgRet ; if msg ret don't call msg ret for ;AN005; | ||
| 348 | JZ I2F5_95 ; default msg - just fail ;AN005; | ||
| 349 | STC ;AN005; | ||
| 350 | JMP SHORT I2F5_220 ;AN005; | ||
| 351 | I2F5_95: ;AN005; | ||
| 352 | MOV DH,1 ;AN000; | ||
| 353 | CALL SYSGETMSG ; puts msg in dssi,cx=msg size ;AN000; | ||
| 354 | MOV AH,1 ; set al = msg type 0 or 1 ;AN000; | ||
| 355 | CMP AL,55 ; all but 55,64,65,88 are 1 ;AN000; | ||
| 356 | JL I2F5_120 ;AN000; | ||
| 357 | JE I2F5_100 ;AN000; | ||
| 358 | CMP AL,64 ;AN000; | ||
| 359 | JL I2F5_120 ;AN000; | ||
| 360 | JE I2F5_100 ;AN000; | ||
| 361 | CMP AL,65 ;AN000; | ||
| 362 | JE I2F5_100 ;AN000; | ||
| 363 | CMP AL,88 ;AN000; | ||
| 364 | JNE I2F5_120 ;AN000; | ||
| 365 | ;AN000; | ||
| 366 | I2F5_100: ;AN000; | ||
| 367 | DEC AH ;AN000; | ||
| 368 | ;AN000; | ||
| 369 | I2F5_120: ;AN000; | ||
| 370 | MOV AL,AH ;AN000; | ||
| 371 | SaveReg <CS> ; msg ret has 0D0A24 at end of msg ;AN003; | ||
| 372 | RestoreReg <ES> ; must change this to asciiz ;AN003; | ||
| 373 | MOV DI,OFFSET CS:TEMPBUF+80 ; move to temp buff and put 0 at 0DH ;AN003;;AC008;(80) | ||
| 374 | SaveReg <DI,AX> ; preserve msg offset and msg type ;AN003; | ||
| 375 | REP MOVSB ; move msg to temp buff ;AN003; | ||
| 376 | XOR AL,AL ;AN003; | ||
| 377 | STOSB ; store zero at end ;AN003; | ||
| 378 | I2F5_160: ;AN003; | ||
| 379 | RestoreReg <AX,DI> ; msg type/ msg offset ;AN003; | ||
| 380 | JMP SHORT I2F5_220 ;AN000; | ||
| 381 | ;AN000; | ||
| 382 | ;AN000; | ||
| 383 | I2F5_200: ; fs supplies error msg ;AN000; | ||
| 384 | MOV AL,ES:[BX.IFSR_MSG_TYPE] ; grab ifs msg info ;AN000; | ||
| 385 | MOV DI,WORD PTR ES:[BX.IFSR_MSG@] ;AN000; | ||
| 386 | MOV ES,WORD PTR ES:[BX.IFSR_MSG@+2] ;AN000; | ||
| 387 | ADD SP,2 ; restore stack ;AN000; | ||
| 388 | I2F5_220: ;AN000; | ||
| 389 | PUSHF ; save carry ;AN005; | ||
| 390 | TEST CS:IFSPROC_FLAGS,IsMsgRet ; if msgret reset semaphore ;AN005; | ||
| 391 | JZ I2F5_240 ;AN005; | ||
| 392 | AND CS:IFSSEM,NOT MR_ERRMSG_SEM ;AN005; | ||
| 393 | I2F5_240: ;AN005; | ||
| 394 | POPF ; restore carry ;AN005; | ||
| 395 | RestoreReg <BX,SI,DS> ; retrieve command.com regs ;AN002;AC003; | ||
| 396 | ;AN000; | ||
| 397 | I2F5_1000: ;AN000; | ||
| 398 | RET 2 ; Fakey IRET ;AN000; | ||
| 399 | ;AN000; | ||
| 400 | EndProc INT_2F_5 ;AN000; | ||
| 401 | ;AN000; | ||
| 402 | ASSUME SS:DOSGROUP ;AN000; | ||
| 403 | ;AN000; | ||
| 404 | ;AN000; | ||
| 405 | ;AN000; | ||
| 406 | BREAK <SET_EXTERR_INFO -- Set IBMDOS error info> ;AN000; | ||
| 407 | ;AN000; | ||
| 408 | ;************************************************************************************ ;AN000; | ||
| 409 | ; ;AN000; | ||
| 410 | ; SET_EXTERR_INFO ;AN000; | ||
| 411 | ; ;AN000; | ||
| 412 | ; Inputs: ;AN000; | ||
| 413 | ; AL is extended error ;AN000; | ||
| 414 | ; IFSR ;AN000; | ||
| 415 | ; ;AN000; | ||
| 416 | ; Function: ;AN000; | ||
| 417 | ; Set all the EXTERR stuff and ALLOWED ;AN000; | ||
| 418 | ; ;AN000; | ||
| 419 | ; Outputs: ;AN000; | ||
| 420 | ; following set: ;AN000; | ||
| 421 | ; EXTERR word ;AN000; | ||
| 422 | ; EXTERR_ACTION byte ;AN000; | ||
| 423 | ; EXTERR_CLASS " ;AN000; | ||
| 424 | ; EXTERR_LOCUS " ;AN000; | ||
| 425 | ; ALLOWED " ;AN000; | ||
| 426 | ; ;AN000; | ||
| 427 | ; Regs: all preserved ;AN000; | ||
| 428 | ; ;AN000; | ||
| 429 | ;************************************************************************************ ;AN000; | ||
| 430 | ;AN000; | ||
| 431 | procedure SET_EXTERR_INFO,NEAR ;AN000; | ||
| 432 | ASSUME DS:IFSSEG,ES:NOTHING ;AN000; | ||
| 433 | ;AN000; | ||
| 434 | ifsr_fcn_def EXECAPI ;AN000; | ||
| 435 | ;AN000; | ||
| 436 | PUSHF ;AN000; | ||
| 437 | SaveReg <AX,CX,SI,DS> ;AC003; | ||
| 438 | ;AN000; | ||
| 439 | XOR AH,AH ; set unknown ah=0 ;AN003; | ||
| 440 | MOV SS:[EXTERR],AX ; Set extended error ;AC003; | ||
| 441 | MOV SI,OFFSET ERR_TABLE_IFS ;AC003; | ||
| 442 | SaveReg <CS> ;AN003; | ||
| 443 | RestoreReg <DS> ; ds-ifsseg to access err_table_ifs ;AN003; | ||
| 444 | CMP AL,50 ; if err not in range, set to ?? ;AN003; | ||
| 445 | JL SEI_10 ;AN003; | ||
| 446 | CMP AL,88 ;AN003; | ||
| 447 | JLE SEI_20 ;AN003; | ||
| 448 | SEI_10: ;AN003; | ||
| 449 | MOV AL,89 ;AN003; | ||
| 450 | ;AN003; | ||
| 451 | SEI_20: ;AN003; | ||
| 452 | SUB AL,50 ; space to correct table entry ;AN003; | ||
| 453 | MOV CL,4 | ||
| 454 | MUL CL ;AN003; | ||
| 455 | ADD SI,AX ;AN003; | ||
| 456 | |||
| 457 | SEI_40: ;AN003; | ||
| 458 | LODSW ; AL is CLASS, AH is ACTION ;AN003; | ||
| 459 | MOV [EXTERR_ACTION],AH ; Set ACTION ;AN003; | ||
| 460 | MOV [EXTERR_CLASS],AL ; Set CLASS ;AN003; | ||
| 461 | LODSW ; al- LOCUS ah- ALLOWED ;AN003; | ||
| 462 | TEST IFSPROC_FLAGS,ISCDS ;AN003; | ||
| 463 | JNZ SEI_50 ;AN003; | ||
| 464 | ADD AL,2 ;AN003; | ||
| 465 | SEI_50: ;AN003; | ||
| 466 | MOV [EXTERR_LOCUS],AL ;AN003; | ||
| 467 | MOV [ALLOWED],AH ;AN003; | ||
| 468 | ;AN003; | ||
| 469 | MOV SI,BX ; Set ds:si -> ifsr so can use ;AN003; | ||
| 470 | SaveReg <ES> ; lodsw to get cl,act,loc,allowed ;AN003; | ||
| 471 | RestoreReg <DS> ;AN003; | ||
| 472 | ADD SI,IFSR_ERROR_CLASS ;AN003; | ||
| 473 | ; only set if ifs set (not -1) ;AN000; | ||
| 474 | LODSW ; AH = action, AL = class ;AN000; | ||
| 475 | CMP AL,ERROR_INFO_NOT_SET ;AN000; | ||
| 476 | JE SEI_60 ;AN000; | ||
| 477 | MOV [EXTERR_CLASS],AL ; set class ;AN000; | ||
| 478 | SEI_60: ;AN000; | ||
| 479 | CMP AH,ERROR_INFO_NOT_SET ;AN000; | ||
| 480 | JE SEI_80 ;AN000; | ||
| 481 | MOV [EXTERR_ACTION],AH ; set action ;AN000; | ||
| 482 | SEI_80: ;AN000; | ||
| 483 | LODSW ; AH = allowed, AL = locus ;AN000; | ||
| 484 | CMP AL,ERROR_INFO_NOT_SET ;AN000; | ||
| 485 | JE SEI_100 ;AN000; | ||
| 486 | MOV [EXTERR_LOCUS],AL ; Set locus ;AN000; | ||
| 487 | SEI_100: ;AN000; | ||
| 488 | CMP AH,ERROR_INFO_NOT_SET ;AN000; | ||
| 489 | JE SEI_1000 ;AN000; | ||
| 490 | MOV [ALLOWED],AH ;AN000; | ||
| 491 | |||
| 492 | SEI_1000: ;AN003; | ||
| 493 | RestoreReg <DS,SI,CX,AX> ;AN000; | ||
| 494 | POPF ;AN000; | ||
| 495 | return ;AN000; | ||
| 496 | |||
| 497 | EndProc SET_EXTERR_INFO ;AN000; | ||
| 498 | |||
| 499 | |||
| 500 | BREAK <DEVICE2EXTERR -- Convert device error to extended error > ;AN004; | ||
| 501 | |||
| 502 | ;************************************************************************************ | ||
| 503 | ; | ||
| 504 | ; DEVICE2EXTERR | ||
| 505 | ; | ||
| 506 | ; Inputs: | ||
| 507 | ; AX is device error | ||
| 508 | ; | ||
| 509 | ; Function: | ||
| 510 | ; Convert device error to extended error | ||
| 511 | ; This is essentially the same routine as in IBMDOS | ||
| 512 | ; | ||
| 513 | ; Outputs: | ||
| 514 | ; AX = extended error | ||
| 515 | ; | ||
| 516 | ; Regs: all preserved | ||
| 517 | ; | ||
| 518 | ;************************************************************************************ | ||
| 519 | |||
| 520 | procedure DEVICE2EXTERR,NEAR ;AN004; | ||
| 521 | ;AN004; | ||
| 522 | SaveReg <DI> ;AN004; | ||
| 523 | MOV DI,AX ;AN004; | ||
| 524 | MOV AX,OFFSET ErrMap24End ;AN004; | ||
| 525 | SUB AX,OFFSET ErrMap24 ; AX is the index of the first ;AN004; | ||
| 526 | ; unavailable error. ;AN004; | ||
| 527 | ; Do not translate if >= AX. ;AN004; | ||
| 528 | CMP DI,AX ;AN004; | ||
| 529 | MOV AX,DI ;AN004; | ||
| 530 | JAE D2E_20 ;AN004; | ||
| 531 | MOV AL,ErrMap24[DI] ;AN004; | ||
| 532 | XOR AH,AH ;AN004; | ||
| 533 | D2E_20: ;AN004; | ||
| 534 | RestoreReg <DI> ;AN004; | ||
| 535 | return ;AN004; | ||
| 536 | ;AN004; | ||
| 537 | EndProc DEVICE2EXTERR ;AN004; | ||
| 538 | |||
| 539 | BREAK <IFS_I24 -- Do an INT 24 error> ;AN000; | ||
| 540 | ;AN000; | ||
| 541 | ;************************************************************************************ ;AN000; | ||
| 542 | ; ;AN000; | ||
| 543 | ; IFS_I24 ;AN000; | ||
| 544 | ; ;AN000; | ||
| 545 | ; Called by: CALL_IFS ;AN000; | ||
| 546 | ; ;AN000; | ||
| 547 | ; Routines called: DOS: NET_I24_ENTRY ;AN000; | ||
| 548 | ; ;AN000; | ||
| 549 | ; Inputs: ;AN000; | ||
| 550 | ; [IFSDRV] set (-1 = device, PHONEY_NAME set) ;AN000; | ||
| 551 | ; [EXTERR...] Set ;AN000; | ||
| 552 | ; [ALLOWED] Set ;AN000; | ||
| 553 | ; IFSR ;AN000; | ||
| 554 | ; ;AN000; | ||
| 555 | ; Function: ;AN000; | ||
| 556 | ; DI = Mapped I 24 error code (0-12) ;AN000; | ||
| 557 | ; AH is bit info (if block) ;AN000; | ||
| 558 | ; Perform I 24 error to get user response ;AN000; | ||
| 559 | ; ;AN000; | ||
| 560 | ; Outputs: ;AN000; | ||
| 561 | ; AL = 0 ;AN000; | ||
| 562 | ; Ignore ;AN000; | ||
| 563 | ; AL = 1 ;AN000; | ||
| 564 | ; Retry ;AN000; | ||
| 565 | ; AL = 3 ;AN000; | ||
| 566 | ; Fail ;AN000; | ||
| 567 | ; ;AN000; | ||
| 568 | ; Regs: DI, AX Revised ;AN000; | ||
| 569 | ; ;AN000; | ||
| 570 | ;************************************************************************************ ;AN000; | ||
| 571 | ;AN000; | ||
| 572 | procedure IFS_I24,NEAR ;AN000; | ||
| 573 | ASSUME DS:NOTHING,ES:NOTHING ;AN000; | ||
| 574 | ;AN000; | ||
| 575 | XOR AH,AH ; AL - extended error (retcode) ;AD007; | ||
| 576 | MOV DI,AX ; set DI = i24 error code C-general fail ;AC007; | ||
| 577 | MOV WORD PTR [EXITHOLD+2],ES ; save es:bp here since fetchi ;AN000; | ||
| 578 | MOV WORD PTR [EXITHOLD],BP ; restores in NET_I24_ENTRY ;AN000; | ||
| 579 | PUSH CS ;AN000; | ||
| 580 | POP BP ; BP=seg part of BP:SI dev ptr ;AN000; | ||
| 581 | ;AN000; | ||
| 582 | MOV AL,[IFSDRV] ; set dev hdr offset ;AN000; | ||
| 583 | CMP AL,-1 ;AN000; | ||
| 584 | JZ I24_20 ;AN000; | ||
| 585 | MOV SI,OFFSET PHONEY_BLOCK ; block device ;AN000; | ||
| 586 | JMP SHORT I24_40 ;AN000; | ||
| 587 | I24_20: ;AN000; | ||
| 588 | MOV SI,OFFSET PHONEY_DEVICE ; char device ;AN000; | ||
| 589 | MOV AH,87H ; char dev, write, data area ;AN007; | ||
| 590 | ;AN000; | ||
| 591 | I24_40: ;AN000; | ||
| 592 | OR AH,ES:[BX.IFSR_ALLOWED] ; bit 7 = 0-disk or 1(other),... ;AC007; | ||
| 593 | ;AN000; | ||
| 594 | CallInstall NET_I24_ENTRY,MultDOS,6,<AX>,<SI> ;AN000; | ||
| 595 | ;AN000; | ||
| 596 | return ;AN000; | ||
| 597 | ;AN000; | ||
| 598 | EndProc IFS_I24 ;AN000; | ||
| 599 | ;AN000; | ||
| 600 | BREAK <PHONEY_DPB -- Set up a phoney DPB for sharing NET INT 24 errors> ;AN000; | ||
| 601 | ;AN000; | ||
| 602 | ;************************************************************************************ ;AN000; | ||
| 603 | ; ;AN000; | ||
| 604 | ; PHONEY_DPB ;AN000; | ||
| 605 | ; ;AN000; | ||
| 606 | ; Input: ;AN000; | ||
| 607 | ; [IFSDRV] Set ;AN000; | ||
| 608 | ; ;AN000; | ||
| 609 | ; Function: ;AN000; | ||
| 610 | ; Build a phoney DPB for IFS Share/Lock errors ;AN000; | ||
| 611 | ; ;AN000; | ||
| 612 | ; Outputs: ;AN000; | ||
| 613 | ; [THISDPB] Set ;AN000; | ||
| 614 | ; ;AN000; | ||
| 615 | ; Regs: ALL preserved ;AN000; | ||
| 616 | ; ;AN000; | ||
| 617 | ;************************************************************************************ ;AN000; | ||
| 618 | ;AN000; | ||
| 619 | procedure PHONEY_DPB,NEAR ;AN000; | ||
| 620 | ASSUME DS:DOSGROUP,ES:NOTHING ;AN000; | ||
| 621 | ;AN000; | ||
| 622 | PUSH AX ;AN000; | ||
| 623 | MOV WORD PTR [THISDPB],OFFSET DUMMY_DPB ;AN000; | ||
| 624 | MOV WORD PTR [THISDPB+2],CS ;AN000; | ||
| 625 | MOV AL,[IFSDRV] ;AN000; | ||
| 626 | MOV BYTE PTR [DUMMY_DPB + dpb_drive],AL ;AN000; | ||
| 627 | MOV WORD PTR [DUMMY_DPB + dpb_driver_addr],OFFSET PHONEY_BLOCK ;AN000; | ||
| 628 | MOV WORD PTR [DUMMY_DPB + dpb_driver_addr + 2],CS ;AN000; | ||
| 629 | POP AX ;AN000; | ||
| 630 | return ;AN000; | ||
| 631 | ;AN000; | ||
| 632 | EndProc PHONEY_DPB ;AN000; | ||
| 633 | |||
| 634 | include msgdcl.inc ;AN000; | ||
| 635 | ;AN000; | ||
| 636 | IFSSEG ENDS ;AN000; | ||
| 637 | END ;AN000; | ||