Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
I n the course of normal operations, the various I/O devices attached to a PC, such as the
keyboard and disk drives, require servicing from the system’s microprocessor. Although
I/O devices may be treated like memory locations, there is one big difference between the
two: I/O devices generally have the capability to interrupt the microprocessor while it is exe-
cuting a program. The I/O device does this by issuing an Interrupt (INT) or Interrupt Re-
quest (INTR or IRQ) input signal to the microprocessor.
INTERRUPTS
If the microprocessor is responding to INT signals and a peripheral device issues an interrupt
request on an IRQ line, the microprocessor will finish executing its current instruction and
issue an Interrupt Acknowledge (INTA) signal on the control bus. The microprocessor
suspends its normal operation and stores the contents of its internal registers in a special stor-
age area referred to as the stack.
The interrupting device (or an interrupt controller) responds by sending the starting address
of a special program called the interrupt service routine to the microprocessor. The micro-
processor uses the interrupt service routine to service the interrupting device. After the mi-
croprocessor finishes servicing the interrupting device, the contents of the stack are restored
to their original locations, and the microprocessor returns to the original program at the point
where the interrupt occurred.
Because more than one peripheral device might require the attention of the microprocessor at
any given time, all computer systems have methods of handling multiple interrupts in an or-
derly fashion. The simplest method calls for the microprocessor, or the interrupt controller,
to have multiple interrupt inputs that have a fixed priority of service. In this manner, if two in-
terrupt signals occur at the same instant, the interrupt that has the highest priority is serviced
first.
Figure 1:
Programmable Interrupt
Interrupt Circuitry
In the course of normal operations, the various I/O devices attached to the Turbo-PC—such
as the keyboard and disk drives—require servicing from the system’s microprocessor. The
Turbo-PC is an interrupt-driven system and employs the interrupt controller subsystem of
the M1523 to ensure quick, smooth performance from the system. Its interrupt subsystem
provides 14, independently programmable, edge-triggered, or level-triggered interrupt
channels.
Figure 2 shows the internal structure of an 8259A Interrupt Controller. It can handle 8
active-high, prioritized input signals on interrupt request lines IRQ-0 through IRQ-7. IRQ-0
receives the highest priority while IRQ-7 receives the lowest priority. Interrupt signals on
these lines are handled by the Interrupt Request Register (IRR) which stores all of the in-
terrupt levels requesting service, and the In-Service Register (ISR) which stores the priority
of all the interrupt levels currently being serviced.
The interrupt controller’s Control Block contains two registers which oversee the operation
of the controller. The system writes control information into the Initialization Command
Word (ICW) and Operation Command Word (OCW) registers. Conversely, the system
can read the contents of the IRR and ISR registers.
Each of the M1523’s interrupt controllers contain 8259-compatible IRR, ISR, and IMR reg-
isters along with a priority resolver. The priority resolver in the interrupt controller is used
to determine the highest priority of all active IRQ inputs, even if multiple interrupts are acti-
vated simultaneously.
Of the 16 interrupt channels (IRQ-0 through IRQ-15) generated, five are used inside the
M1523, and therefore, do not have an external IRQ input pin. The other thirteen IRQ inputs
are available to the system for user definable interrupt functions that meet specific require-
ments of different user’s systems. Each IRQ input is assigned a priority level. IRQ-0 is the
highest and IRQ-15 is the lowest. The internally connected channels are:
Table 1 shows the designations for the various interrupt levels in the system.
INTC1 INTC2
During an Interrupt Acknowledge cycle, the master interrupt controller writes a code word
into the slave controller. This code word is compared to three ID codes that have been written
into the slave controller. If the code word matches one of the previous codes, the slave con-
troller will issue an interrupt vector.
1. When one or more of the M1523’s IRQ inputs become active, the
selected interrupt controller sets its corresponding IRR bits.
2. The priority resolver evaluates the priority of the IRQ(s) received,
based on the conditions of the IRR, IMR, and ISR registers and asserts an
INTR signal to the microprocessor.
3. When the microprocessor accepts the interruption, it enters into INTA
cycles. These cycles produce the necessary signals (M/IO, D/C, and W/R
= 0) to cause the M1521’s internal bus controller to issue a coded INTA
signal (CBE0-CBE3=0000) to the M1523. This create the proper bus
conditions for data movement from the M1523’s Interrupt Controller,
through the M1521, and to the microprocessor.
NMI Circuitry
The Turbo-PC’s Non-Maskable Interrupt (NMI) function is performed by the logic cir-
cuitry illustrated in Figure 4. On the system board, there are two conditions that will cause an
NMI signal to be sent to the microprocessor. The first condition occurs when an active IO
Channel Check (IOCHCK) input is received from an options adapter card located in one of
the board’s ISA expansion slots.
ISA
SLOTS U18 U14
IOCHECK 70H 1523 µP
SERR
7 NMI
U12 LOGIC
1521 61H
EN IOCHCK NMI
3 NMI
PARITY SERR
ERROR
Figure 4: 6
IOCHCK
NMI Logic 7
SERR
Circuitry
The system’s BIOS enables this signal during initialization by writing a logic 0 into bit-3
(ENIOCK) of the M1523’s NMI Status and Control Port register at hex address 61.
When an ISA device produces an active IOCHCK signal, the M1523 responds by generating
an NMI signal that is applied directly to the microprocessor.
The other event that will cause an NMI signal to be generated is the occurrence of a Parity
Check (PCK) error in the system’s DRAM memory. The BIOS enables the parity check sig-
nal by writing a logic 0 into bit-7 of the NMI Enable register at hex address 70, during the
system’s initialization. When the M1521 detects a parity error, it signals the M1523 by acti-
vating its System Error (SERR) line. In turn, the M1523 issues the NMI signal to the micro-
processor.
Table 3:
NMI Status and
Control Register in
the ALI Chip Set
The Port-B functions primarily include enabling different system board options and report-
ing the status of key conditions. The enabling options include: the system’s Timer/Counter-2
output, system board error reporting, and IOCHCK/NMI function. The status of the
Timer/Counter-2 output, IOCHCK, and SERR lines can be read at this port.
The system’s speaker data signal is routed through bit-1 of the register, while bit-4 is toggled
each time a DRAM Refresh operation is performed.