Interrupt Vector Table: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
On the [[x86]] architecture, the '''Interupt Vector Table (IVT)''' is a table that specifies the addresses of all the 256 interrupt handlers used in [[real mode]]. Although it is also called IDT, it usually goes by the name of IVT to avoid confusions realted with the protected mode [[interrupt descriptor table]].
The '''Interrupt Vector Table''' ('''IVT''') is specific for the <tt>[[X86]]</tt> architecture. It contains segment:offset pairs to all 256 interrupts. For <tt>[[I386]]</tt> or newer architectures it is still used in [[real mode]].


Typically, the IVT is located at 0000:0000H and is 400H bytes in size, 4 bytes for each interrupt. Although the default address can be changed using the LIDT on newer CPUs, this is usually not done because it is both inconvenient and incompatible with other implementations and/or older software (e.g. MS-DOS programs). However, note that the code must remain in the first MiB of RAM.
== Structure ==

The IVT is located at memory address 0x0. It contains 256 4-byte entries. Every entry has this structure:

Byte:
+---------------+---------------+
0 | Offset |
+---------------+---------------+
+---------------+---------------+
2 | Segment |
+---------------+---------------+

When you in real mode execute an <tt>[[INT]] 0x10</tt> assembly instruction, the CPU will look up entry 0x10 (located at 0x10 * 4) and jump to specified segment:offset.

== Newer architectures ==

Newer architectures, since <tt>I386</tt>, can be in [[protected mode]]. Then you have to use an [[Interrupt Descriptor Table]] (note the name difference), which is the IVT counterpart in protected mode.


== See also ==
== See also ==
Line 24: Line 7:
* [[Interrupt Descriptor Table]]
* [[Interrupt Descriptor Table]]
* [[Real mode]]
* [[Real mode]]
* [[Segment]]

{{Stub}}


[[Category:X86 CPU]]
[[Category:X86 CPU]]

Revision as of 06:30, 28 January 2009

On the x86 architecture, the Interupt Vector Table (IVT) is a table that specifies the addresses of all the 256 interrupt handlers used in real mode. Although it is also called IDT, it usually goes by the name of IVT to avoid confusions realted with the protected mode interrupt descriptor table.

Typically, the IVT is located at 0000:0000H and is 400H bytes in size, 4 bytes for each interrupt. Although the default address can be changed using the LIDT on newer CPUs, this is usually not done because it is both inconvenient and incompatible with other implementations and/or older software (e.g. MS-DOS programs). However, note that the code must remain in the first MiB of RAM.

See also