185 lines
3.8 KiB
HTML
185 lines
3.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type"
|
|
content="text-html; charset=Windows-1252">
|
|
<title>INT 24 - Critical Error Handler</title>
|
|
<meta name="FORMATTER" content="Microsoft FrontPage 2.0">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1><a name="kap_interrupt_2830"></a>INT 24 - Critical Error
|
|
Handler</h1>
|
|
|
|
<p> no input data</p>
|
|
|
|
<p> on entry to INT 24:</p>
|
|
|
|
<p> AH = bit 7 of register AH is set to one if other than disk
|
|
error</p>
|
|
|
|
<p> = bit 7 of register AH is set to zero if disk error</p>
|
|
|
|
<p> AL = failing drive number</p>
|
|
|
|
<p> AH = bits 0-2 indicate affected disk area and read/write
|
|
status</p>
|
|
|
|
<p> ¦5¦4¦3¦2¦1¦0¦ AH</p>
|
|
|
|
<p> ¦ ¦ ¦ ¦ ¦ +---- read = 0, write = 1</p>
|
|
|
|
<p> ¦ ¦ ¦ +------- 00=DOS, 01=FAT, 10=DIR, 11=data area</p>
|
|
|
|
<p> ¦ ¦ +-------- 0=FAIL not allowed, 1=FAIL allowed</p>
|
|
|
|
<p> ¦ +--------- 0=RETRY not allowed, 1=RETRY allowed</p>
|
|
|
|
<p> +---------- 0=IGNORE not allowed, 1=IGNORE allowed</p>
|
|
|
|
<p> DI = error code in lower byte</p>
|
|
|
|
<p> BP:SI = pointer to device header control block where
|
|
additional</p>
|
|
|
|
<p> information about the error can be found</p>
|
|
|
|
<p> on exit:</p>
|
|
|
|
<p> AL = action code determining exit behavior</p>
|
|
|
|
<p> = 00 ignore error</p>
|
|
|
|
<p> = 01 retry</p>
|
|
|
|
<p> = 02 terminate through ~INT 23~</p>
|
|
|
|
<p> = 03 fail system call (DOS 3.x+)</p>
|
|
|
|
<p> % Error Codes in low order byte of DI:</p>
|
|
|
|
<p> 00 write protect error</p>
|
|
|
|
<p> 01 unknown unit</p>
|
|
|
|
<p> 02 drive not ready</p>
|
|
|
|
<p> 03 unknown command</p>
|
|
|
|
<p> 04 data error (bad CRC)</p>
|
|
|
|
<p> 05 bad request structure length</p>
|
|
|
|
<p> 06 seek error</p>
|
|
|
|
<p> 07 unknown media type</p>
|
|
|
|
<p> 08 sector not found</p>
|
|
|
|
<p> 09 printer out of paper</p>
|
|
|
|
<p> 0A write fault</p>
|
|
|
|
<p> 0B read fault</p>
|
|
|
|
<p> 0C general failure</p>
|
|
|
|
<p> % Users Stack at Entry to Error Handler:</p>
|
|
|
|
<p> (top of stack)</p>
|
|
|
|
<p> IP DOS code next instruction pointer</p>
|
|
|
|
<p> CS</p>
|
|
|
|
<p> FLAGS DOS's flags</p>
|
|
|
|
<p> AX -\</p>
|
|
|
|
<p> BX \</p>
|
|
|
|
<p> CX \</p>
|
|
|
|
<p> DX \</p>
|
|
|
|
<p> SI |- User's registers at entry to INT 21 function</p>
|
|
|
|
<p> DI /</p>
|
|
|
|
<p> BP /</p>
|
|
|
|
<p> DS /</p>
|
|
|
|
<p> ES -/</p>
|
|
|
|
<p> IP User code next instruction pointer</p>
|
|
|
|
<p> CS</p>
|
|
|
|
<p> FLAGS</p>
|
|
|
|
<p> - on entry registers are setup for a retry operation</p>
|
|
|
|
<p> - user routine must issue an IRET or simulate an IRET</p>
|
|
|
|
<p> - ~INT 21,0~ through ~INT 21,C~ and ~INT 21,59~ can safely be
|
|
invoked</p>
|
|
|
|
<p> from the handler. Other calls may destroy DOS's stack</p>
|
|
|
|
<p> - handler must preserve register SS,SP,DS,ES,BX,CX,DX</p>
|
|
|
|
<p> - choosing ignore can show side effects, since it causes DOS</p>
|
|
|
|
<p> to continue as if it the call were successful</p>
|
|
|
|
<p> - if an improper action code is specified in DOS 3.x it is
|
|
changed:</p>
|
|
|
|
<p> if IGNORE is invalidly specified, action is converted to FAIL</p>
|
|
|
|
<p> if RETRY is invalidly specified, action is converted to FAIL</p>
|
|
|
|
<p> if FAIL is invalidly specified, action is converted to ABORT</p>
|
|
|
|
<p> - IGNORE requests are converted to FAIL for ~FAT~ and ~DIR~
|
|
disk</p>
|
|
|
|
<p> errors and network critical errors</p>
|
|
|
|
<p> - if the user routine wishes to handle the error instead of
|
|
passing</p>
|
|
|
|
<p> it to DOS, it must restore the user program registers from
|
|
the</p>
|
|
|
|
<p> stack and remove all but the last 3 words from the stack
|
|
(FLAGS,</p>
|
|
|
|
<p> CS, IP) and issue an ~IRET~</p>
|
|
|
|
<p> - do not execute this interrupt directly</p>
|
|
|
|
<p> - ~INDOS~ flag is cleared on INT 24 (see ~INT 21,34~)</p>
|
|
|
|
<hr>
|
|
|
|
<table border="0" width="100%" cols="3">
|
|
<tr>
|
|
<td width="33%">Zurück zum <a href="inte1at0.htm">Interrupt
|
|
Info</a>. </td>
|
|
<td align="center" width="33%"><a
|
|
href="mailto:Roger.Morgan@htl-steyr.ac.at">Roger Morgan</a>
|
|
/ 1998 </td>
|
|
<td align="right" width="33%"><font size="1">L.Änderung <!--webbot
|
|
bot="Timestamp" s-type="EDITED" s-format="%d.%m.%y"
|
|
startspan -->29.03.99<!--webbot bot="Timestamp" endspan
|
|
i-checksum="13964" --> </font></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|