Re: Question about CPU predefined interrupt and BIOS interrupt




robertwessel2@xxxxxxxxx wrote:
jfguo wrote:
There are some predefined interrupts and exceptions in the processor,
for example vector 9 for CoProcessor Segment Overrun.


It stopped being that after the 386.


But "INT
0x09" is defined for the keyboard in the BIOS.
I wondered whether the CoProcessor Segment Overrun handler or the
keyboard service handler of BIOS is executed when I execute "INT
0x09".


Intel reserved the first 32 interrupt vector for their own use, but
used only the first eight, IIRC, on the 8086/8. Unfortunately IBM used
a bunch of vectors starting with 0x08 in the real mode BIOS on the
first PC (for example, IRQ0-7 were mapped to Int 0x08-0x0f, and BIOS
APIs started at Int 0x10). When Intel introduced the 286, it defined
additional exceptions in the reserved range.

In real mode this means you have to avoid generating any of the "new"
exceptions (not that hard, most have to do the protected mode anyway),
since you can't really tell what's happening.

Thanks for the explanation. This has clarify some misconceptions of
mine.
But I still can't understand how to resolve the confilts of INT of BIOS
and the
predefinition of Intel. For example, the 0x10 is defined for
Floating-Point Error
in real-address mode. And as I know, the int 0x10 is for VGA in BIOS.
How to avoid to use int 0x10 in BIOS?


In protected mode, the OS will map the IRQs to a different location (by
reprogramming the 8259, or, more likely the APIC), and it will avoid
actually using the reserved interrupts for anything other than their
Intel reserved purpose. The one exception being the v86 emulation for
DOS sessions, but those are not the real interrupt vectors, so there's
no conflict.

Does this mean the BIOS services has no effects when the OS, for
example Windows XP, is operating in protected mode? And the BIOS
only functions in the booting of OS?

.



Relevant Pages

  • Re: Keyboard Input
    ... Now I am going to try to get it to accept inputs from the keyboard to ... And writing a keyboard handler for rmode will prepare you for writing one for pmode, and will introduce you to handling hardware interrupts - which you'll be doing a lot of, I suspect. ... but the keypress has been put in memory by the bios! ... But the bios also installs the "int 9 handler" which responds to actual keyboard interrupts. ...
    (comp.lang.asm.x86)
  • Re: Gigabyte GA 586 Board und Festplatten > 32 GB
    ... >>> Wenn ich aber lese, was in den ganzen Texten zu meinem BIOS steht, ... ich für Deine Auffassungsgabe? ... rather than the register based calling convention of the original INT 13 ... > die EDV den Leuten, ...
    (de.comp.hardware.laufwerke.festplatten)
  • Re: INT 16h Equivalent Calls in Windows?
    ... What are my options for low level calls in windows to do the keyboard ... Why not use 32 bit protected mode assembler with actual BIOS calls. ...
    (comp.lang.asm.x86)
  • Re: INT 16h Equivalent Calls in Windows?
    ... What are my options for low level calls in windows to do the keyboard ... Why not use 32 bit protected mode assembler with actual BIOS calls. ...
    (comp.lang.asm.x86)
  • [PATCH 2.6.23.stable] ACPI: sync blacklist w/ latest
    ... Check to see if the given machine has a known bad ACPI BIOS ... * Only a couple use it to make Linux run better. ... unsigned int length, char *desc) ... extern int dmi_get_year; ...
    (Linux-Kernel)