Page 1 of 1

The INT instruction disable the IRQs?

Posted: Mon Mar 31, 2003 12:00 am
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.

RE:The INT instruction disable the IRQs?

Posted: Tue Apr 01, 2003 12:00 am
by Tim Robinson
The CPU disables interrupts automatically before invoking your ISR. You will need to enable them manually.

RE:The INT instruction disable the IRQs?

Posted: Tue Apr 01, 2003 12:00 am
by pepito
How I must do it?
It is possible to simply use the STI instruction?