PMode interrupt again...

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
drizzt

PMode interrupt again...

Post by drizzt »

[attachment deleted by admin]
drizzt

Re:PMode interrupt again...

Post by drizzt »

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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PMode interrupt again...

Post by Pype.Clicker »

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 ...
drizzt

Re:PMode interrupt again...

Post by drizzt »

[attachment deleted by admin]
drizzt

Re:PMode interrupt again...

Post by drizzt »

what Tran/Renaissance made in its tutorial on pmode/v86/etc. was to dedicate *one* protected mode interrupt to realmode callback.
ah... pype, could you send me this tutorial?! ...or simply a link to it ;)

thanks!
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PMode interrupt again...

Post by Pype.Clicker »

[attachment deleted by admin]
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PMode interrupt again...

Post by Pype.Clicker »

[attachment deleted by admin]
beyondsociety

Re:PMode interrupt again...

Post by beyondsociety »

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.
beyondsociety

Re:PMode interrupt again...

Post by beyondsociety »

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?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PMode interrupt again...

Post by Pype.Clicker »

you do whatever you want with your registers. no logic is needed ...
Post Reply