Page 2 of 2
Posted: Mon Mar 31, 2008 2:21 am
by Pitchu
AJ wrote:The gist of it is - the ISR is installed by the operating system. You will need to use your IRQ 0x01 handler. In real mode, it may well be Int 0x09.
Cheers,
Adam
I believe ISR for int 0-10h is installed by bios?
Posted: Mon Mar 31, 2008 2:29 am
by JamesM
Pitchu wrote:AJ wrote:The gist of it is - the ISR is installed by the operating system. You will need to use your IRQ 0x01 handler. In real mode, it may well be Int 0x09.
Cheers,
Adam
I believe ISR for int 0-10h is installed by bios?
the IVT is indeed installed by the bios, but is useless once you move to 32 bit mode.
Posted: Mon Mar 31, 2008 2:47 am
by Pitchu
Yeah exactly
Please Dont take my words otherwise, what i wanna know is that i believe that the jmp instruction to reboot is also loaded/placed in memory by bios which gets executed once sombody presses ctrl+alt+del.
If I am correct then this instruction will be a part of some ISR that is invoked by atleast a single key press....I believe ISR for keyboard.
Now to do something else for that event(i.e. ctrl+alt+del) i think i should hook keyboard ISR.
Posted: Mon Mar 31, 2008 4:04 am
by JamesM
You were told that in the first few replies. I suggest you read before ranting.
Posted: Mon Mar 31, 2008 12:46 pm
by lukem95
your chatting a whole heap of crap, youv had very clear answers. When any key is pressed, it fires an interrupt. Using ISR's you can run code when this interrupt is fired, and get the scancode (a unique code for the key, every key has a different one - lists are available if you google for them).
Posted: Wed Apr 02, 2008 2:54 am
by Pitchu
Well I dont think what I was chatting was rubish as i wasnt able to get the clear working of ctrl+alt+del key combination rebooting the system.
I knew that i can alter its working but was confused where to put that code that will pop-up a box like other OSes do.
Still, If you people think I was doing this for fun then U people are wrong.
Well, I shouldnt mention but I cant live with that, this isnt still clear and I need not to get clear it for insults.
Posted: Wed Apr 02, 2008 2:59 am
by AJ
Hi,
If you have read the Intel Manuals and have read up information from the wiki, the replies you have had should make this perfectly clear. We can give you pointers in the right direction, but can't give you the full background knowlege required or implement the solution for you.
You need to know how the IVT works (RMode) or how the IDT works (PMode) and be able to create handlers based on this.
Cheers,
Adam
Posted: Wed Apr 02, 2008 5:45 am
by Pitchu
OK!
Considering the Real Mode of Intel Processor I believe:
1. Int 09H ISR checks for the key combination of Ctrl+Alt+Del and reboots it my making a far jmp.
2. Hooking this Int 09H will mean installing a KeyBoard driver there.
Consider the PMode :
1. I need to Remap the PIC.
2. Hook the int Corresponding to IRQ 01 and install keyboard driver there.
Hope this time I am correct
Posted: Wed Apr 02, 2008 7:28 am
by t6q4
Hello,
To add to your list of things needed to hook up a keyboard driver in PMode, my list is:
1) Remap the PIC (Because otherwise the IRQ 1 is Interrupt 9, and as you may know Ints 0-31 are reserved to service exceptions)
2) Set up your GDT (Or get your bootloader to do this if you are using your own, otherwise do it in your kernel)
3) Set up the IDT (This is important. You will also need to create entries for the first 32 exceptions and the 16 IRQs. Maybe make one for system calls)
4) NOW you can hook up a handler to IRQ 1.
[ The entire list is covered in Bran's Kernel Development Tutorial on
http://www.osdever.net/ ]
Posted: Wed Apr 02, 2008 7:51 am
by zaleschiemilgabriel
I have a feeling we're not in Kansas anymore...
Posted: Wed Apr 02, 2008 8:39 am
by cyr1x
Pitchu wrote:OK!
1. Int 09H ISR checks for the key combination of Ctrl+Alt+Del and reboots it my making a far jmp.
Not "int 0x9" does the "far jmp", but it invokes "int 0x19" which does the "far jmp".
Posted: Wed Apr 02, 2008 10:28 am
by Pitchu
Hi Cyr1x & T6q4
yep its int 19h that does far jmp.
And thanks for reply n link.
Lol