The INT instruction disable the IRQs?

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
pepito

The INT instruction disable the IRQs?

Post by pepito »

I have a ISR for the keybord IRQ 1 (INT 21h). This ISR set a flag each time the user hit a key (and unset the flag when the user release the key).

I like a OS service that wait for a 'keyboard hit', then I wrote it:

_kbhit:
mov al, [hayTecleo]
cmp al, 0
je _kbhit     
ret

It works nice, but if I use it as an ISR of a software interrupt (int 31h)
it not works.

What happend?

Thank you.
Tim Robinson

RE:The INT instruction disable the IRQs?

Post by Tim Robinson »

The CPU disables interrupts automatically before invoking your ISR. You will need to enable them manually.
pepito

RE:The INT instruction disable the IRQs?

Post by pepito »

How I must do it?
It is possible to simply use the STI instruction?
Post Reply