310 likes | 540 Views
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
E N D
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 then ISR routine starts at $11820
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 only have one kind of interrupt? NO. 8259 chip will allow us to have up to 8 AND if we use nine 8259 chips we can have up to 64!