Atlas - INT24.DOC

Home / ext / JunkDrawer / DOS / BuildTools / v2.0 Lines: 1 | Size: 4225 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1 DIFFERENCES AND NEW ADDITIONS 2 TO THE INT 24H HARD ERROR 3 HANDLER(s) FOR MSDOS 2.0 4 5 61.) Additional Constraints: 7 8 Under previous versions it was not explicitly stated 9 that an INT 24H handler must preserve the ES register. 10 It is now required that INT 24H handlers preserve ES. 11 12 When it is desired to ignore an error, the same 13 registers must be preserved as when it is desired to 14 retry the operation (SS,SP,DS,BX,CX,DX). 15 16 It was not clearly stated in the past, but it was 17 true, that only system calls 1-12 can be made by an INT 18 24H handler. Making any other calls will destroy the 19 DOS stack and thus its ability to retry or ignore an 20 error. 21 22 INT 24H Handlers should always return to the DOS 23 on a retry, ignore, or abort. Failure to return to the 24 DOS will leave the DOS in an unstable state until a non 25 1-12 function call is made. 26 272.) Additional features: 28 29 Character device errors are now handled by the INT 30 24H mechanism. Previously only Disk I/O errors were 31 handled by the INT 24H handler. Additional information 32 is now passed to the INT 24H handler in the BP and SI 33 registers (which need not be preserved). 34 35 BP:SI is a DWORD pointer to the Device Header of 36 the device causing the error. Information can be gotten 37 from this header as to whether the device is a block 38 or character device, and if the device is a character 39 device the name of the device can also be obtained. The 40 DEVICE-DRIVERS document for 2.0 contains the definition 41 of this header format. 42 43 NOTE: AL (drive number for Disk errors) is indeterminate 44 on character device errors. Bit 7 of AH is always 45 1 for character device errors, previously bit 7 was 46 1 only in the case of a bad memory image of the FAT. 47 48LIST OF INT 24H ERROR CODES PASSED IN DI 49 50 0 Write Protect violation 51 1 Unknown Unit NEW 52 2 Drive not ready 53 3 Unknown command NEW 54 4 CRC error 55 5 Bad Drive Request Structure length NEW 56 6 Seek error 57 7 Unknown media NEW 58 8 Sector not found 59 60 9 Printer out of paper NEW 61 A Write Fault 62 B Read Fault NEW 63 C General Failure 64 65As mentioned above BP:SI points to the device header: 66 67BP:SI-> 68 +--------------------------------------+ 69 | DWORD Pointer to next device | 70 | (-1 if last device) | 71 +--------------------------------------+ 72 | WORD Attributes | 73 | Bit 15 = 1 if char device 0 if blk | 74 | if bit 15 is 1 | 75 | Bit 0 = 1 if Current sti device | 76 | Bit 1 = 1 if Current sto output | 77 | Bit 2 = 1 if Current NUL device | 78 | Bit 3 = 1 if Current CLOCK dev | 79 | Bit 14 is the IOCTL bit (see below) | 80 | Bit 13 is the NON IBM FORMAT bit | 81 +--------------------------------------+ 82 | WORD Pointer to Device strategy | 83 | entry point | 84 +--------------------------------------+ 85 | WORD Pointer to Device interrupt | 86 | entry point | 87 +--------------------------------------+ 88 | 8-BYTE character device name field | 89 | Character devices set a device name | 90 | For block devices the first byte is | 91 | The number of units | 92 +--------------------------------------+ 93 94 To tell if the error occured on a block or character 95device you must look at bit 15 in the attribute field (WORD 96at BP:SI+4). 97 98 If the name of the character device is desired look at 99the eight bytes starting at BP:SI+10. 100 101
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.