[Prev][Next][Index][Thread]

x86 interrupt handling



I'm also a little puzzled about the interrupt handling logic. Here again I am very sure that there is a good reason for the handling and that I have missed it.
 
It appears that interrupts are programmed to manifest as exception vectors 0x20..0x27 (master) and 0x28..0x2f (slave). This is good, as it ensures that the trap vectors are disjoint. Under DOS, in contrast, it is hard to distinguish interrupts from exceptions, and in some cases this proves unfortunate.
 
Given the uniform numbering, the absence of a unified trap handler has me a bit puzzled. The interrupt entry points clearly need to disable the PICs, but this can be done according to the same design logic that differentiates exceptions that push an error code from those that don't -- it's a third (primary) and fourth (secondary) case. Once the interrupt vector numbers are recoded, there is no real reason why they shouldn't just go through the standard trap handler with exception codes in the range 0x20..0x2f. The only difference that I can see in the two handlers is the use of different annotation tables. Unless I have missed something, the separation of annotation tables appears to be a side effect of the separation of the trap/interrupt handlers rather than an intended aspect of the design.
 
I'm surely missing something here, and I'ld appreciate a hint as to what it might be.
 
While I'm thinking about it, how heavily do the various COM objects rely on the annotation mechanism?