* better
[mascara-docs.git] / hw / i386.reference / s09_07.htm
blobbf15ec78a236215590a1fba17f0abace914331d0
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>80386 Programmer's Reference Manual -- Section 9.7</TITLE>
5 </HEAD>
6 <BODY>
7 <B>up:</B> <A HREF="c09.htm">
8 Chapter 9 -- Exceptions and Interrupts</A><BR>
9 <B>prev:</B> <A HREF="s09_06.htm">9.6 Interrupt Tasks and Interrupt Procedures</A><BR>
10 <B>next:</B> <A HREF="s09_08.htm">9.8 Exception Conditions</A>
11 <P>
12 <HR>
13 <P>
14 <H1>9.7 Error Code</H1>
15 With exceptions that relate to a specific segment, the processor pushes an
16 error code onto the stack of the exception handler (whether procedure or
17 task). The error code has the format shown in
18 <A HREF="#fig9-7">Figure 9-7</A>
19 . The format of the
20 error code resembles that of a selector; however, instead of an RPL field,
21 the error code contains two one-bit items:
22 <OL>
23 <LI> The processor sets the EXT bit if an event external to the program
24 caused the exception.
25 <LI> The processor sets the I-bit (IDT-bit) if the index portion of the
26 error code refers to a gate descriptor in the IDT.
27 </OL>
28 If the I-bit is not set, the TI bit indicates whether the error code refers
29 to the GDT (value 0) or to the LDT (value 1). The remaining 14 bits are the
30 upper 14 bits of the segment selector involved. In some cases the error code
31 on the stack is null, i.e., all bits in the low-order word are zero.
32 <P>
33 <A NAME="fig9-7">
34 <IMG align=center SRC="fig9-7.gif" border=0>
35 <P>
36 <HR>
37 <P>
38 <B>up:</B> <A HREF="c09.htm">
39 Chapter 9 -- Exceptions and Interrupts</A><BR>
40 <B>prev:</B> <A HREF="s09_06.htm">9.6 Interrupt Tasks and Interrupt Procedures</A><BR>
41 <B>next:</B> <A HREF="s09_08.htm">9.8 Exception Conditions</A>
42 </BODY>