i need ur help for the following question: The following code reads port 0x21 (i
ID: 3612163 • Letter: I
Question
i need ur help for the following question: The following code reads port 0x21 (interrupt mask register) of PIC (Programmable Interrupt Controller), sets the 2nd bit that is mapped to IRQ1 and writes it back to port 0x21. As a result keyboard interrupt will be disabled as IRQ1 is used by keyboard. disable keyboard interrupt in PIC mask register Modify instruction_03 for the following: set bit for IRQO set bit for IRQ6 set bits for IRQ1, IRQ3 and IRQ4 clear bit for IRQ5 clear bits for IRQ2, IRQ5, IRQ6 and IRQ7Explanation / Answer
1. Set bit to disable IRQ0
IN AL, 21H ; Read interrupt mask register
OR AL , 1 ; set bit 1
OUT 20H, AL ; modify the interrupt mask register
2. Set bit to disable IRQ6
IN AL, 21H ; Read interrupt mask register
OR AL , 10000000B ; set bit 6
OUT 21H, AL ; modify the interrupt mask register
4. Set bit to disableIRQ5
IN AL, 21H ; Read interrupt mask register
OR AL , 5 ; set bit 1
OUT 21H, AL ; modify the interrupt mask register
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.