I know about the IDT and the IDT register pointing to it, but can I poke in an address to where the jump vector of interrupt 50 is?
OK, let me explain this better: I want to set up a protected mode handler for int 50h, which will be the TBOS2 syscall interrupt similar to DOS' int 21h. How can I do this?
Setting up interrupts in pmode
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Setting up interrupts in pmode
Just install your int handler into the correct location within your IDT...thats about it.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Setting up interrupts in pmode
You do it same way as you already installed #GP,PF,DF,SS,TS and other exceptions which involes writing writing handler address into the correct(number 50?) entry of the pmode IDT and extending the IDT limit (in idtr) if necessary.
Re: Setting up interrupts in pmode
Hi,
One thing - just remember to increase the limit portion of IDTR appropriately, otherwise you'll wonder why you're getting a read beyond the IDT limits.
Cheers,
Adam
One thing - just remember to increase the limit portion of IDTR appropriately, otherwise you'll wonder why you're getting a read beyond the IDT limits.
Cheers,
Adam
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Setting up interrupts in pmode
G'morning...
Well that sounds easy enough. I'll get to work on that when I need to throw it in.
Thanks!
Well that sounds easy enough. I'll get to work on that when I need to throw it in.
Thanks!