Academic Help Online

A local company has decided to build a real LC-3 computer. In order to make the computer work in a network, four interrupt-driven I/O devices are connected. To request service, a device asserts its interrupt request signal (IRQ). This causes a bit to get set in a special LC-3 memory-mapped interrupt control register called INTCTL which is mapped to address xFFOO. The INTCTL register is shown below. When a device requests service, the INT signal in the LC-3 data path is asserted. The LC-3 interrupt service routine determines which device has requested service and calls the appropriate subroutine for that device. If more than one device asserts its IRQ signal at the same time, only the subroutine for the
highest priority device is executed. During execution of the subroutine, the corresponding bit in INTCTL is cleared.

The following labels are used to identify the first instruction of each device subroutine:
HARDDISK ETHERNET PRINTER CDROM
For example, if the highest priority device requesting service is the printer, the interrupt service routine will call the printer subroutine with the following instruction:
JSR PRINTER
Finish the code in the LC-3 interrupt service routine for the following priority scheme by filling in the spaces labeled (a)-(k). The lower the number, the higher the priority of the device.
1. Hard disk
2. Ethernet card
3. Printer
4. CD-ROM

READ ALSO :   Business