Академический Документы
Профессиональный Документы
Культура Документы
Language Programming
Assignment # 5
Spring 2009
Total Marks: 15
Due Date
Your assignment must be uploaded before or on 13th June 2009.
Upload Instructions
Please view the document related to assignment submission process provided to
you by the Virtual University to upload the assignment.
Rules for Marking
Kindly note that your assignment will NOT be graded if:
It is submitted after due date
The file you uploaded does not open
The file you uploaded is copied from someone else
It is in the format other than .doc
Objective
This assignment has been designed to enable you:
To understand how to enable/disable interrupts by using port
0x21 of PIC
Assignment
Question_1: 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. [10 marks]
OR
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.
01 [org 0x0100]
06 int 0x21
Sol:
We should disable interrupts while hooking interrupt 8h, i.e. while placing its segment and offset in the
interrupt vector table.
II. We need not do this for interrupt 80h.
OR
I. We should disable interrupts while hooking interrupt 8h, i.e. while placing its segment and
offset in the interrupt vector table.