New Microsoft PowerPoint Presentation.pptx

RAJEEVKUMARYADAV11 269 views 15 slides Apr 20, 2022
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

Interrupt of 8086


Slide Content

INTERRUPTS OF 8086 NAME- RAJEEV KUMAR REGNO- 20UGELE08 DEPARTMENT- ELECTRICAL ENGINEERING SEMESTER- IV

CONTENTS INTERRUPTS TYPES OF INTERRUPTS Interrupt instruction of 8086 Instruction of interrupt Reference

INTERRUPT An Interrupt is used to cause a temporary halt in the execution of program. The meaning of ‘interrupts’ is to break the sequence of operation. When the Microprocessor is executing a program, an ‘interrupt’ breaks the normal sequence of execution of instruction, diverts its execution to some other program called Interrupt Service Routine (ISR). After executing ISR, IRET return the control back again to the main program Interrupt Processing is an alternative to, the polling .

Types OF INTERRUPTS HARDWERE INTERRUPT SOFTWERE INTERRUPT MASKABLE INTERRUPT NON- MASKABLE INTERRUPT

HARDWARE INTERRUPT Hardware interrupt is caused by any peripheral device by sending a signal through a specified pin to the microprocessor . The 8086 has two hardware interrupt pins, i.e. NMI and INTR. NMI is a non-maskable interrupt and INTR is a maskable interrupt having lower priority. One more interrupt pin associated is INTA called interrupt acknowledge . The primary sources of interrupts, however, are the PCs timer chip, Keyboard, serial port, parallel port, disk drives, CMOS real-time clock, Mouse, Sound Card and other Peripheral devices.

DIAGRAM OF INTERRUPT

NON-MASKABLE INTERRUPT It is a single non-maskable interrupt pin (NMI) having higher priority than the maskable interrupt request pin (INTR)and it is of type 2 interrupt . When this interrupt is activated, these actions take place − Completes the current instruction that is in progress. Pushes the Flag register values on to the stack. Pushes the CS (code segment) value and IP (instruction pointer) value of the return address on to the stack. IP is loaded from the contents of the word location 00008H. CS is loaded from the contents of the next word location 0000AH . Interrupt flag and trap flag are reset to 0.

MASKABLE INTERRUPT The INTR is a maskable interrupt because the microprocessor will be interrupted only if interrupts are enabled using set interrupt flag instruction. It should not be enabled using clear interrupt Flag instruction. The INTR interrupt is activated by an I/O port. If the interrupt is enabled and NMI is disabled, then the microprocessor first completes the current execution and sends ‘0’ on INTA pin twice. The first ‘0’ means INTA informs the external device to get ready and during the second ‘0’ the microprocessor receives the 8 bit, say X, from the programmable interrupt controller. These actions are taken by the microprocessor − First completes the current instruction. Activates INTA output and receives the interrupt type, say X. Flag register value, CS value of the return address and IP value of the return address are pushed on to the stack. IP value is loaded from the contents of word location X × 4 CS is loaded from the contents of the next word location. Interrupt flag and trap flag is reset to 0

SOFTWARE INTERRUPT When the source of interrupt is the execution of interrupt instruction, this interrupt is known as software interrupt . . IN 8086 there are about 256 interrupt such as INT 00H, INT 01H, INT 02H to INT FFH Whenever the INT interrupt instruction is executed, the microprocessor automatically saves the contents of the flag register, Instruction Pointer(IP) and the code segment register on the stack and jump to specified memory location. Software Interrupt are always generated by INT instruction and Used for divided- by- Zero error, single step, NMI, break point, and overflow interrupt.

Interrupt Type 0- INT 00H(Divide by zero Error) The 8086 generates a type 0 interrupt, if the result of DIV or IDV operation is too large to fit in the destination register. For this interrupt ,8086 push the content of the flag register on the stack, reset IF and TF and also pushes the content of CS and IP onto the stack. Then 8086 gets the starting address of the interrupt service procedure from the interrupt pointer table. Therefore, Load the new value of CS from addresses 00002H and 00003H; also load the new value of IP from addresses 00000H and 00001H.

Interrupt Type-INT 01H(Single Step) During execution of sequence of instruction, there is frequently a need to examine the content of CPU’s register and system memory. This is done by executing one instruction at a time and then inspecting the registers and memory. If they are correct, the user can give the command to go on and execute the next generation. This is called single stepping. When the CPU gets a type 1 interrupt, initially it pushes the flag register onto the stack, changing the trap bit and pops the flag register back from the stack. Then it loads the CS value from starting address 00006H and IP value from starting address 00004H for the type 1 interrupt service routine.

Interrupt Instruction of 8086 The interrupt instruction of 8086 microprocessor are CLI, STI, INT n INTO, HLT and WAIT. Mnemonics Function Operation CLI Clear interrupt instruction, IF affected. IF 0 STI Set Interrupt flag, IF affected IF 1 INTO Interrupt overflow. TF and IF affected. Same as INT4

R eference Soumitra Kumar Mandal Microprocessor - 8086 Interrupts (tutorialspoint.com)

This Photo by Unknown Author is licensed under CC BY-NC-ND
Tags