Page 1 of 1

Setting up interrupts in pmode

Posted: Sun Sep 14, 2008 10:03 pm
by Troy Martin
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?

Re: Setting up interrupts in pmode

Posted: Sun Sep 14, 2008 10:07 pm
by neon
Just install your int handler into the correct location within your IDT...thats about it.

Re: Setting up interrupts in pmode

Posted: Mon Sep 15, 2008 8:02 am
by geppy
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

Posted: Mon Sep 15, 2008 8:04 am
by AJ
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

Re: Setting up interrupts in pmode

Posted: Mon Sep 15, 2008 8:42 am
by Troy Martin
G'morning...

Well that sounds easy enough. I'll get to work on that when I need to throw it in.

Thanks!