to unmask an IRQ I use
outbyte(MASTER + 1, IRQ & 0xFF);
That means that I set the bit for the IRQ I want to unmask to '1'. But the FAQ says that
outb(0x21,0xfd);
unmaskes the keyboard..here all bits are set to 1, except for the one I?d like to unmask? Should I set a bit to 1 och 0 if I wanna mask/unmask the IRQ?
And how do I unmask an IRQ on the slave? And how do I mask the IRQs
Unmasking IRQs
Re:Unmasking IRQs
hi,
to unmask an irq you set the bit to zero
and to use the slave irqs you unmask bit 2 (cascade) and then unmask the irq on the slave (port 0xa1);
bye
pkd
to unmask an irq you set the bit to zero
and to use the slave irqs you unmask bit 2 (cascade) and then unmask the irq on the slave (port 0xa1);
bye
pkd
Re:Unmasking IRQs
Do I have to rewrite the entire mask-byte? If it?s something like this:
11101010
and I wanna change the first bit.. do I have to read the bit, OR it with 0x1 and the rewrite it?
11101010
and I wanna change the first bit.. do I have to read the bit, OR it with 0x1 and the rewrite it?
Re:Unmasking IRQs
Yes...Larry wrote: Do I have to rewrite the entire mask-byte? If it?s something like this:
11101010
and I wanna change the first bit.. do I have to read the bit, OR it with 0x1 and the rewrite it?
Re:Unmasking IRQs
Hi,
Instead of:
Cheers,
Brendan
IO port access is slow. It's possible to cache the PIC mask value in RAM, e.g.:Larry wrote: Do I have to rewrite the entire mask-byte? If it?s something like this:
11101010
and I wanna change the first bit.. do I have to read the bit, OR it with 0x1 and the rewrite it?
Code: Select all
mov al,[currentPIC1maskValue]
or al,1
mov [currentPIC1maskValue],al
out PIC1+1,al
Code: Select all
in al,PIC1+1
or al,1
out PIC1+1,al
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.