hi I have an exception system up, and when I try infintive looping, I get an exception. Also it does when I have sumfin like for(i = 1; i<1000; i++) {code()}
it blocks it.
It works only if I CLI.
Is this normal behaviour?
Thnx, Adrian.
loops and exceptions
-
jamethiel
RE:loops and exceptions
Are you sure you're catching an exception from your code, and not from a hardware interrupt?
-
carbonBased
RE:loops and exceptions
Indeed! Have you redirected hardware interrupts to beyond 0x20?
Also, which exception? There are many
I could see an alignment exception being caused... but you'd have to voluntarily set the alignment bit in... CR0 (?) I think, as well as eflags. Most ppl don't do this
(my OS, on the other hand, will cause an exception at any unaligned code... I wanna make sure all my apps are properly compiled
)
Jeff
Also, which exception? There are many
Jeff
-
Adek336
RE:loops and exceptions
Ahh! I considered the timer, but then I moved my research to keyboards. I am just trying to get my IRQ working but it doh runs only once. Haven't forgotten about outportb(0x20, 0x20).
Any suggestions?
Thnx, Adrian.
Any suggestions?
Thnx, Adrian.
-
carbonBased
RE:loops and exceptions
> Any suggestions?
Yeah! Actually write the ISR
The keyboard interrupt will only be recognised if the keyboard knows you've received the last keystroke, so-to-speak. In other words, in your keyboard ISR, be sure to actually _get_ the keystroke (inportb(0x60) iirc), then all should work as expected.
Cheers!
Jeff
Yeah! Actually write the ISR
The keyboard interrupt will only be recognised if the keyboard knows you've received the last keystroke, so-to-speak. In other words, in your keyboard ISR, be sure to actually _get_ the keystroke (inportb(0x60) iirc), then all should work as expected.
Cheers!
Jeff
-
Adek336
RE:loops and exceptions
you're a genius! now it works 
now i get a "hello world" message each keystroke.
Thnx, Adrian.
Thanx
now i get a "hello world" message each keystroke.
Thnx, Adrian.
Thanx