Interrupt 9h and BIOS

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

Interrupt 9h and BIOS

Post by renovatio »

When I turn on my computer and after the bios boots my system, is the interrupt 9h (in the IVT) pointing to a code that is useful to interrupt 16h (bios), or int 16h uses polling to read the port?

Thanks.
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

Re: Interrupt 9h and BIOS

Post by renovatio »

I don't want to be impacient, but can anyone help me?

Thanks again ;)
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Interrupt 9h and BIOS

Post by JohnnyTheDon »

I would guess that it depends on your BIOS. It is probably a good idea not to mess with the lower parts of the real mode IVT unless you no longer want to use the BIOS.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Interrupt 9h and BIOS

Post by Love4Boobies »

Interrupt 9 is an IRQ. On every keystroke (assuming the IF flag in EFLAGS is set), IRQ 9 fires up. In real-address mode, the BIOS interrupt 16H is used (by software) for keyboard services (e.g. stuff like waiting for a keystroke). You could, if you like, write your own handler for IRQ 9 and handle keystrokes at any given time; however, you do need to read on the keyboard controller so you know how to handle the data.

Regards,
Bogdan
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: Interrupt 9h and BIOS

Post by bewing »

BIOSes are not multitasking, and they almost never have embedded drivers. So they almost never use IRQs. They almost always use polling. I suspect that if you look hard, though, that you will find exceptions.

And as JohnnyTheDon says, it's smartest just to leave the IVT alone until you are completely in PMode, and you can guarantee that you will never return to Real mode ever again. Then you don't need to worry yourself about how the IVT works.
1234
Posts: 24
Joined: Sat May 26, 2007 7:58 pm

Post by 1234 »

[post deleted]
Last edited by 1234 on Tue Jan 27, 2009 3:21 pm, edited 2 times in total.
renovatio
Member
Member
Posts: 57
Joined: Fri May 23, 2008 5:13 am

Re: Interrupt 9h and BIOS

Post by renovatio »

thanks for your replies...
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Interrupt 9h and BIOS

Post by jal »

Love4Boobies wrote:Interrupt 9 is an IRQ. On every keystroke (assuming the IF flag in EFLAGS is set), IRQ 9 fires up
Well, not quite, it's that IRQ 1 (the keyboard) triggers INT 9 (there's an offset of 8 for IRQs).


JAL
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Interrupt 9h and BIOS

Post by Love4Boobies »

jal wrote:
Love4Boobies wrote:Interrupt 9 is an IRQ. On every keystroke (assuming the IF flag in EFLAGS is set), IRQ 9 fires up
Well, not quite, it's that IRQ 1 (the keyboard) triggers INT 9 (there's an offset of 8 for IRQs).


JAL
You're right, I don't know why I said that... :oops: IRQ 1 was the IRQ...
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply