8088 interrupts - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

8088 interrupts

Description:

... the most common way for external hardware to signal the microprocessor that some ... 5) Pushes the IP of the next instruction onto the stack ... – PowerPoint PPT presentation

Number of Views:161
Avg rating:3.0/5.0
Slides: 10
Provided by: drmar
Category:
Tags: interrupts

less

Transcript and Presenter's Notes

Title: 8088 interrupts


1
8088 interrupts
  • Interrupts are the most common way for external
    hardware to signal the microprocessor that some
    kind of service is needed (such as reading a key
    from the keyboard)
  • There are 256 different types of 8088 interrupts
    (00 - 0FFh)
  • Interrupts can be caused by
  • internal interrupts (exceptions)
  • external events (NMI and INTR)
  • software instructions (INT xx)

2
8088 interrupt sequence
  • When the 8088 recognizes an interrupt, it
  • 1) Completes execution of the current instruction
  • 2) Pushes the flag register onto the stack
  • 3) Clears the interrupt enable bit
  • 4) Pushes the CS of the next instruction onto
    the stack
  • 5) Pushes the IP of the next instruction onto
    the stack
  • 6) Reads the interrupt type from the data bus
  • 7) Does a Jump Indirect to the address stored
    at
  • type4, type4 1 IP of interrupt service
    routine type4 2, type4 3 CS of interrupt
    service routine
  • Note this implies that the lowest 1K of memory
    is reserved to hold the interrupt vector table.

3
Interrupt service routines
  • An interrupt service routine is simply an
    assembly language program that handles the device
    requesting an interrupt.
  • An interrupt service routine is terminated by an
    IRET instruction that
  • 1) pops the CS of the next instruction from the
    stack
  • 2) pops the IP of the next instruction from the
    stack
  • 3) pops the flag register from the stack

What function must the interrupt service routine
perform? Cause the INTR line to go low!
4
NMI
  • The NMI (Non-maskable interrupt) is a
    positive-edge-sensitive external input to the
    8088
  • The NMI cannot be ignored by the 8088
  • An NMI is a type 2 interrupt.
  • Its interrupt vector is stored at addresses 08,
    09, 0A, and 0B.
  • In order to be recognized as a positive edge, the
    NMI line must be low for two clock cycles
  • The external device must hold NMI high after
    causing the edge

5
INTR
  • INTR is an active-high level-sensitive interrupt
    request line (external 8088 input)
  • Interrupt requests are recognized if the
    interrupt enable bit is 1
  • Interrupt requests are ignored if the interrupt
    enable bit is 0
  • SEI sets the interrupt enable bitCLI clears the
    interrupt enable bit

6
INTA
  • INTA in the 8088s interrupt acknowledge pin (an
    external output)
  • When the 8088 recognizes an interrupt, it sends a
    low pulse on INTA to signal the external device
    to get ready to put the interrupt type on the
    data lines
  • A second low pulse on INTA signals the external
    device to put the type number on the data lines

7
Interrupt priorities
  • An interrupt service routine can itself be
    interrupted only by a higher priority interrupt
  • Priorities (from highest to lowest)
  • Reset
  • Internal interrupts and exceptions
  • Software interrupts
  • Non-maskable interrupt
  • External hardware interrupts
  • For external hardware interrupts, the higher the
    type number, the lower the priority

8
Interrupt types
  • Type 0 Divide Error
  • Type 1 Single step
  • Type 2 NMI
  • Type 3 Breakpoint
  • Type 4 Overflow
  • Type 510 - 3110 Reserved (internal software and
    BIOS)
  • Type 3210 - 25510 User available

9
Homework for Thursday, November 4
  • Draw the connections between the 8255s and write
    8088 assembly language programs to have two
    computers communicate using 8255s.
  • Computer 1 should transmit using PortB as an
    output in Mode 1. Transmit 20 bytes of data from
    an array called DATAOUT (DATAOUT db
    ?,?,?,?,?,?,?,?)
  • Computer 2 should receive using PortA as an input
    in Mode 1. Store the 20 bytes received in an
    array called DATAIN (DATAIN db ?,?,?,?,?,?,?,?)
Write a Comment
User Comments (0)
About PowerShow.com