30
CHAPTER 6 INTERRUPTS AND THE 8259 CHIP

CHAPTER 6 INTERRUPTS AND THE 8259 CHIP

  • Upload
    banyan

  • View
    58

  • Download
    0

Embed Size (px)

DESCRIPTION

CHAPTER 6 INTERRUPTS AND THE 8259 CHIP. What happens on interrupt?. Micro automatically saves (on stack) the FR (flag register), IP (instruction pointer), CS (code segement register). There are 255 interrupts. The address of the appropriate ISR can be computed by - PowerPoint PPT Presentation

Citation preview

Page 1: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

CHAPTER 6

INTERRUPTS AND THE 8259 CHIP

Page 2: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

What happens on interrupt?

Micro automatically saves (on stack) the FR (flag register), IP (instruction pointer), CS (code segement register).

There are 255 interrupts.

The address of the appropriate ISR can be computed by multiplying the interrupt number by 4!

The 4 bytes in the interrupt vector table contain CS:IP

The address where the ISR is located is

IP <= IP value in table + CS value in table (shifted left one nybble!)

Example: CS value in table is $0001 and IP is $1820 thenISR routine starts at $11820

Page 3: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Interrupt Vector Table

Page 4: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

8088 Interrupt List

Page 5: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Hardware Versus Software Interrupts

INTR (pos level sensitive) and NMI (posedge sensitive)

INT is command that causes software interrupt.

Also, have EXCEPTIONS (SWI that happens automatically w/o INT cmd)

If we only have one INTR pin, does that mean we can onlyhave one kind of interrupt? NO. 8259 chip will allow usto have up to 8 AND if we use nine 8259 chips we can haveup to 64!

Page 6: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Condition Codes (Status) Register

Page 7: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

ISR Addresses

Page 8: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

8259 Programmable Interrupt Controller

Page 9: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

8259 Programmable Interrupt Controller Block Diagram

Page 10: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Addresses for 8259 ICWs

Page 11: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

ICW1 and ICW2 Formats

Page 12: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

INT Numbers

Page 13: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

ICW3 and ICW4 Formats

Page 14: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Finding ICWs for a 8259

Page 15: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Addresses for 8259 OCWs

Page 16: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

OCW Format for the 8259

Page 17: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Enabling IR0 thru IR7

Page 18: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Issuing the EOI to 8259 Chip

Page 19: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

8259 Port Addresses in IBM PC/XT Computer

Page 20: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

PC/XT I/O Address Map

Page 21: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

IBM PC/XT hardware Interrupts

Page 22: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

IBM PC/XT Initialization of 8259

Page 23: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

What happens on interrupt?

Page 24: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

PC/XT Sources of Hardware Interrupt

Page 25: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

PC/XT Sources of NMI Interrupt

Page 26: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

PC/XT Port Uses

Page 27: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

What caused the NMI?

Page 28: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Ch 6 Problems (part1)

Page 29: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Ch 6 Problems (part 2)

Page 30: CHAPTER 6 INTERRUPTS AND  THE 8259 CHIP

Ch 6 Problems (part 3)