PMode interrupt again...
Re:PMode interrupt again...
Ehm.. another question.. if I write a common interrupt handler for every 256 interrupts (also for interrupt 08h)... it should not call the common interrupt handler at every clock tick?!
Thanx in advance.
Thanx in advance.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:PMode interrupt again...
what Tran/Renaissance made in its tutorial on pmode/v86/etc. was to dedicate *one* protected mode interrupt to realmode callback.
i.e. in order to call INT 10h, setup 320x200, you would have
push 0x10
mov ax, 0x0013
int 0x31 (that was the virtual interrupt request)
add esp, 4
and well, yes, if you want your trick to work, you'll have to switch back to INT 08 (real mode) when IRQ0 is fired. however, if you decide to speed up the clock (i.e. 1KHz for scheduling), you're not forced to call INT 08 every time: you can divide its frequency at will ...
i.e. in order to call INT 10h, setup 320x200, you would have
push 0x10
mov ax, 0x0013
int 0x31 (that was the virtual interrupt request)
add esp, 4
and well, yes, if you want your trick to work, you'll have to switch back to INT 08 (real mode) when IRQ0 is fired. however, if you decide to speed up the clock (i.e. 1KHz for scheduling), you're not forced to call INT 08 every time: you can divide its frequency at will ...
Re:PMode interrupt again...
ah... pype, could you send me this tutorial?! ...or simply a link to itwhat Tran/Renaissance made in its tutorial on pmode/v86/etc. was to dedicate *one* protected mode interrupt to realmode callback.
thanks!
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:PMode interrupt again...
Thanks for posting your code here, it helped me get into protected mode.
Thankyou drizzt!
I can finally stop trying to get my protected mode code to work and start on my kernel.
Thankyou drizzt!
I can finally stop trying to get my protected mode code to work and start on my kernel.
Re:PMode interrupt again...
This has nothing to do with your post but with the code you posted.
When you entered pmode, then setup the registers, why did you use the bx register instead of the ax register.
Does it matter what register you use?
ax,bx,cx,dx
Whats your logic behind this?
When you entered pmode, then setup the registers, why did you use the bx register instead of the ax register.
Does it matter what register you use?
ax,bx,cx,dx
Whats your logic behind this?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:PMode interrupt again...
you do whatever you want with your registers. no logic is needed ...