+ /* Generate ISR stubs and fill the IVT */
+ for (i = 0x00; i <= 0xFF; i++)
+ {
+ Offset = INT_HANDLER_OFFSET + (i << 4);
+ IntVecTable[i] = MAKELONG(Offset, BiosSegment);
+
+ BiosCode[Offset++] = 0xFA; // cli
+
+ BiosCode[Offset++] = 0x6A; // push i
+ BiosCode[Offset++] = (UCHAR)i;
+
+ BiosCode[Offset++] = 0x6A; // push 0
+ BiosCode[Offset++] = 0x00;
+
+ BopSeqOffset = COMMON_STUB_OFFSET - (Offset + 3);
+
+ BiosCode[Offset++] = 0xE9; // jmp near BOP_SEQ
+ BiosCode[Offset++] = LOBYTE(BopSeqOffset);
+ BiosCode[Offset++] = HIBYTE(BopSeqOffset);
+ }