user3724492
user3724492

Reputation: 109

Where is the Interrupt Vector Table located?

Is the Interrupt Vector Table in ROM or RAM? If it's in RAM, where is it loaded from? Also, does the table depend on the operating system? For example, in MS-DOS "int 0x80" is for playing music and stuff, but in Linux it's a system call. So, in MS-DOS, is the interrupt 0x80 handled by the operating system or ROM? If it's in ROM, does Linux overwrite the table entry?

Upvotes: 5

Views: 7211

Answers (1)

Ross Ridge
Ross Ridge

Reputation: 39571

On a PC the interrupt vector table (IVT) is always located in RAM. By default it's located at 0000:0000 at the start of memory, but it's possible to move it using the LIDT instruction. MS-DOS doesn't move the IVT, but Linux might. Either way it will be in RAM somewhere.

Interrupt 0x80 isn't a standard MS-DOS or BIOS interrupt and so normally goes unhandled under MS-DOS. If it's used it all, it's been handled by some third party code (eg. a TSR or maybe a driver) that isn't part of the operating system. Other interrupts might be handled by either MS-DOS (eg. 0x21) or the BIOS (eg. 0x10). In the former case the code for handling the interrupt would be in RAM, while in the later case the code would be in ROM. (Though it's likely the BIOS ROM has been copied to read-only shadow RAM located at the same address of the ROM, as the BIOS code runs much faster this way.)

Under protected mode operating systems like Linux, interrupts are handled exclusively by the operating system.

Upvotes: 6

Related Questions