Page 1 of 1

Polling with Interrupts?

Posted: Tue Aug 28, 2007 1:39 pm
by 01000101
I would like to know if there is a way to do a dedicated never-ending loop styled polling system but include the ability to still accept things like keyboard interrupts?

Example: A dedicated network box that implements polling non-stop of network packets, can it be setup to still catch the keyboard scancodes from the handler?

Posted: Tue Aug 28, 2007 2:54 pm
by JamesM
yes...

Code: Select all

sti
.loop:
<do poll check>
jmp .loop

interrupt_handler:
<do_interrupt_stuff>
iret
why wouldn't that work?

Posted: Tue Aug 28, 2007 3:07 pm
by JAAman
of course... thats what interupts are for

you can poll anything you would like, as long as anything that needs to interupt it uses interupts

if you mean not using interupts at all and polling all devices, well thats a significantly more complex issue