Vous êtes sur la page 1sur 37

8086 Microprocessor

It provides 14, 16-bit registers.

8086 requires one phase clock with a 33% duty cycle to provide optimized internal timing.

– Range of clock:

• 5 MHz for 8086 • 8Mhz for 8086-2 • 10Mhz for 8086-1

8086 Internal Architecture

Bus Interface Unit

Sends out addresses for memory locations


Fetches Instructions from memory
Reads/Writes data to memory
Sends out addresses for I/O ports
Reads/Writes data to Input/Output ports

Execution Unit

Tells BIU (addresses) where to fetch instructions or data


Decodes & Executes instructions
Dividing the work between BIU & EU speeds up processing
Architecture Diagram of 8086

Execution Unit

Main components are


• Instruction Decoder
• Control System
• Arithmetic Logic Unit
• General Purpose Registers
• Flag Register
• Pointer & Index registers

Instruction Decoder
Translates instructions fetched from memory into a series of actions which EU carries out
Control System
Generates timing and control signals to perform the internal operations of the
microprocessor
Arithmetic Logic Unit
EU has a 16-bit ALU which can ADD, SUBTRACT, AND, OR, increment, decrement,
complement or shift binary numbers
General Purpose Registers

Flag Register:8086 has a 16-bit flag register

Contains 9 active flags


There are two types of flags in 8086
• Conditional flags – six flags, set or reset by EU on the basis of results of some arithmetic
operations
• Control flags – three flags, used to control certain operations of the processor
Bus Interface Unit
Main Components are
• Instruction Queue
• Segment Registers
• Instruction Pointer
Instruction Queue
8086 employs parallel processing
When EU is busy decoding or executing current instruction, the buses of 8086 may not be
in use.
At that time, BIU can use buses to fetch up to six instruction bytes for the following
instructions
BIU stores these pre-fetched bytes in a FIFO register called Instruction Queue
When EU is ready for its next instruction; it simply reads the instruction from the queue
in BIU

Pipelining:EU of 8086 does not have to wait in between for BIU to fetch next instruction byte
from memory
So the presence of a queue in 8086 speeds up the processing
Fetching the next instruction while the current instruction executes is called pipelining
Memory Segmentation
8086 has a 20-bit address bus , So it can address a maximum of 1MB of memory
8086 can work with only four 64KB segments at a time within this 1MB range
These four memory segments are called
• Code segment • Stack segment • Data segment • Extra segment
Code Segment
1. That part of memory from where BIU is currently fetching instruction code bytes Stack
Segment
2. A section of memory set aside to store addresses and data while a subprogram executes
Data & Extra Segments
Used for storing data values to be used in the program.
Segment Registers
hold the upper 16-bits of the starting address for each of the segments
The four segment registers are
• CS (Code Segment register)
• DS (Data Segment register)
• SS (Stack Segment register)
• ES (Extra Segment register)
Address of a segment is of 20-bits
A segment register stores only upper 16- bits
BIU always inserts zeros for the lowest 4- bits of the 20-bit starting address.
E.g. if CS = 348AH, then the code segment will start at 348A0H
A 64-KB segment can be located anywhere in the memory, but will start at an address
with zeros in the lowest 4-bits

Instruction Pointer (IP) Register

a 16-bit register
Holds 16-bit offset, of the next instruction byte in the code segment
BIU uses IP and CS registers to generate the 20-bit address of the instruction to be
fetched from memory
Stack Segment (SS) Register & Stack Pointer (SP) Register

1. Upper 16-bits of the starting address of stack segment is stored in SS register


2. It is located in BIU
3. SP register holds a 16-bit offset from the start of stack segment to the top of the stack
4. It is located in EU

Other Pointer & Index Registers

1. Base Pointer (BP) register 2. Source Index (SI) register


3. Destination Index (DI) register
Can be used for temporary storage of data
Main use is to hold a 16-bit offset of a data word in one of the segments

ADDRESSING MODES OF 8086

Various Addressing Modes

1. Immediate Addressing Mode 2. Register Addressing Mode

3. Direct Addressing Mode 4. Register Indirect Addressing Mode

5. Index Addressing Mode 6. Based Addressing Mode

7. Based & Indexed Addressing Mode 8. Based & Indexed with displacement Addressing

Mode 9. Strings Addressing Mode

IMMEDIATE ADDRESSING MODE

• The instruction will specify the name of the register which holds the data to be operated by the
instruction.

• Source data is within the instruction

• Ex: MOV AX,10ABH AL=ABH, AH=10H

2.REGISTER ADDRESSING MODE

• In immediate addressing mode, an 8-bit or 16-bit data is specified as part of the instruction

• Ex: MOV AX,BLH

3. DIRECT ADDRESSING MODE

• Memory address is supplied with in the instruction

• Mnemonic: MOV AH,[MEMBDS] AH [1000H]


• But the memory address is not index or pointer register

4. REGISTER INDIRECT ADDRESSING MODE

• Memory address is supplied in an index or pointer register

• EX:

MOV AX,[SI] ; AL [SI] ; AH [SI+1]

JMP [DI] ; IP [DI+1: DI]

5.Indexed Addressing Mode

• Memory address is the sum of index register plus displacement

MOV AX,[SI+2] AL [SI+2]; AH [SI+3]

6. Based Addressing Mode

• Memory address is the sum of the BX or BP base register plus a displacement within instruction

• Ex: MOV AX,[BP+2] AL [BP+2]; AH [BP+3]

7.BASED & INDEX ADDRESSING MODES

• Memory address is the sum of the index register & base register

Ex: MOV AX,[BX+SI] ; AL [BX+SI] ; AH [BX+SI+1]

8. BASED & INDEXED WITH DISPLACEMENT ADDRESSING MODE

• Memory address is the sum of an index register , base register and displacement within instruction

MOV AX,[BX+SI+6] ; AL [BX+SI+6] ; AH [BX+SI+7]

9. Strings Addressing Mode

• The memory source address is a register SI in the data segment, and the memory destination address is
register DI in the extra segment

• Ex: MOVSB [ES:DI] [DS:SI]

• If DF=0 SI SI+1 , DI DI+1

DF=1 SI SI-1 , DI DI-1

INSTRUCTION SET of 8086

Instruction set basics:


Instruction:- An instruction is a binary pattern designed inside a microprocessor to perform a
specific function.

• Opcode:- It stands for operational code. It specifies the type of operation to be performed by
CPU. It is the first field in the machine language instruction format.

• E.g. 08 is the opcode for instruction “MOV X,Y”.

• Operand:- We can also say it as data on which operation should act. Operands may be register
values or memory values. The CPU executes the instructions using information present in this
field. It may be 8-bit data or 16-bit data.

Assembler:- it converts the instruction into sequence of binary bits, so that this bits can be read
by the processor.

• Mnemonics:- these are the symbolic codes for either instructions or commands to perform a
particular function.

• E.g. MOV, ADD, SUB etc.

Types of instruction set of 8086 microprocessor

(1). Data Copy/Transfer instructions. (2). Arithmetic & Logical instructions.

(3). Branch instructions. (4). Loop instructions.

(5). Machine Control instructions. (6). Flag Manipulation instructions.

(7). Shift & Rotate instructions. (8). String instructions

(1). Data copy/transfer instructions.

(1). MOV Destination, Source

There will be transfer of data from source to destination.


Source can be register, memory location or immediate data.
Destination can be register or memory operand.
Both Source and Destination cannot be memory location or segment registers at the same
time.

E.g. (1). MOV CX, 037A H; (2). MOV AL, BL; (3). MOV BX, [0301 H];
Stack Pointer

It is a 16-bit register, contains the address of the data item currently on top of the stack.

Stack operation includes pushing (providing) data on to the stack and popping (taking)data from
the stack.

Pushing operation decrements stack pointer and Popping operation increments stack pointer. i.e.
there is a last in first out (LIFO) operation

(2). Push Source

Source can be register, segment register or memory.

This instruction pushes the contents of specified source on to the stack.

In this stack pointer is decremented by 2.

The higher byte data is pushed first (SP-1).

Then lower byte data is pushed (SP-2).


E.g.: (1). PUSH AX; (2). PUSH DS; (3). PUSH [5000H];

(3) POP Destination

 Destination can be register, segment register or memory.


 This instruction pops (takes) the contents of specified destination.
 In this stack pointer is incremented by 2.
 The lower byte data is popped first (SP+1).
 Then higher byte data is popped (SP+2).

E.g. (1). POP AX; (2). POP DS; (3). POP [5000H];
(4). XCHG Destination, source;

• This instruction exchanges contents of Source with destination.

• It cannot exchange two memory locations directly.

•The contents of AL are exchanged with BL.

•The contents of AH are exchanged with BH.

•E.g. (1). XCHG BX, AX; (2). XCHG [5000H],AX;

(5)IN AL/AX, 8-bit/16-bit port address

 It reads from the specified port address.


 It copies data to accumulator from a port with 8- bit or 16-bit address.
 DX is the only register is allowed to carry port address.
 E.g. (1). IN AL, 80H; (2). IN AX,DX; //DX contains address of 16-bit port

(6)OUT 8-bit/16-bit port address, AL/AX

 It writes to the specified port address.


 It copies contents of accumulator to the port with 8-bit or 16-bit address.
 DX is the only register is allowed to carry port address.
 E.g. (1). OUT 80H,AL; (2). OUT DX,AX; //DX contains address of 16-bit port.

(7) XLAT

 Also known as translate instruction.


 It is used to find out codes in case of code conversion. i.e. it translates code of the key
pressed to the corresponding 7-segment code.
 After execution this instruction contents of AL register always gets replaced. E.g.
XLAT;
(8.)LEA 16-bit register (source), address (dest.)

 LEA Also known as Load Effective Address(LEA).


 It loads effective address formed by the destination into the source register.
 E.g.(1). LEA BX,Address; (2). LEA SI,Address[BX];

(9). LDS 16-bit register (source), address (dest.);

(10). LES 16-bit register (source), address (dest.);

 LDS Also known as Load Data Segment (LDS).


 LES Also known as Load Extra Segment (LES).
 It loads the contents of DS (Data Segment) or ES(Extra Segment) & contents of the
destination to the contents of source register.
 E.g.(1). LDS BX,5000H; (2). LES BX,5000H;

(11). LAHF:- This instruction loads the AH register from the contents of lower byte of the flag
register. This command is used to observe the status of the all conditional flags of flag register.
E.g. LAHF;

(12). SAHF:- This instruction sets or resets all conditional flags of flag register with respect to
the corresponding bit positions. If bit position in AH is 1 then related flag is set otherwise flag
will be reset.E.g. SAHF;

PUSH & POP

(13). PUSH F:- This instruction decrements the stack pointer by 2.

 It copies contents of flag register to the memory location pointed by stack pointer.
 E.g. PUSH F;

(14). POP F:- This instruction increments the stack pointer by 2.

 It copies contents of memory location pointed by stack pointer to the flag register.
 E.g. POP F;

(2). Arithmetic Instructions

These instructions perform the

operations like: 1. Addition, 2. Subtraction, 3. Increment,4. Decrement.

(1). ADD destination, source;

 This instruction adds the contents of source operand with the contents of destination
operand.
 The source may be immediate data, memory location or register.
 The destination may be memory location or register.
 The result is stored in destination operand.
 AX is the default destination register.
E.g. (1). ADD AX,2020H; (2). ADD AX,BX;

ADC destination, source

 This instruction adds the contents of source operand with the contents of destination
operand with carry flag bit.
 The source may be immediate data, memory location or register.
 The destination may be memory location or register.
 The result is stored in destination operand.
 AX is the default destination register.
E.g. (1). ADC AX,2020H; (2). ADC AX,BX;

(3) INC source

 This instruction increases the contents of source operand by 1.


 The source may be memory location or register.
 The source can not be immediate data.
 The result is stored in the same place.
 E.g. (1). INC AX; (2). INC [5000H];

4. DEC source

 This instruction decreases the contents of source operand by 1.


 The source may be memory location or register.
 The source can not be immediate data.
 The result is stored in the same place.
E.g. (1). DEC AX; (2). DEC [5000H];

(5) SUB destination, source;

 This instruction subtracts the contents of source operand from contents of destination.
 The source may be immediate data, memory location or register.
 The destination may be memory location or register.
 The result is stored in the destination place.
E.g. (1). SUB AX,1000H; (2). SUB AX,BX;

(6). SBB destination, source; Also known as Subtract with Borrow.

 This instruction subtracts the contents of source operand & borrow from contents of
destination operand.
 The source may be immediate data, memory location or register.
 The destination may be memory location or register.
 The result is stored in the destination place.
E.g. (1). SBB AX,1000H; (2). SBB AX,BX;

(7). CMP destination, source Also known as Compare.

 This instruction compares the contents of source operand with the contents of destination
operands.
 The source may be immediate data, memory location or register.
 The destination may be memory location or register.
 Then resulting carry & zero flag will be set or reset.
E.g. (1). CMP AX,1000H; (2). CMP AX,BX;

AAA (ASCII Adjust after Addition):

 The data entered from the terminal is in ASCII format.


 In ASCII, 0 – 9 are represented by 30H – 39H.
 This instruction allows us to add the ASCII codes.
 This instruction does not have any operand.

Other ASCII Instructions:

AAS (ASCII Adjust after Subtraction)

AAM (ASCII Adjust after Multiplication)

AAD (ASCII Adjust Before Division)

DAA (Decimal Adjust after Addition)

 It is used to make sure that the result of adding two BCD numbers is adjusted to be a
correct BCD number.
 It only works on AL register.

DAS (Decimal Adjust after Subtraction)

 It is used to make sure that the result of subtracting two BCD numbers is adjusted to be a
correct BCD number.
 It only works on AL register.

MUL operand

 Unsigned Multiplication.
 Operand contents are positively signed.
 Operand may be general purpose register or memory location.
 If operand is of 8-bit then multiply it with contents of AL.
 If operand is of 16-bit then multiply it with contents of AX.
 Result is stored in accumulator (AX).
E.g. (1). MUL BH // AX= AL*BH; // (+3) * (+4) = +12.

IMUL operand

 Signed Multiplication.
 Operand contents are negatively signed.
 Operand may be general purpose register, memory location or index register.
 If operand is of 8-bit then multiply it with contents of AL.
 If operand is of 16-bit then multiply it with contents of AX.
 Result is stored in accumulator (AX).
E.g. (1). IMUL BH // AX= AL*BH; // (-3) * (-4) = 12.

DIV operand

 Unsigned Division.
 Operand may be register or memory.
 Operand contents are positively signed.
 Operand may be general purpose register or memory location.
 AL=AX/Operand (8-bit/16-bit) & AH=Remainder.
E.g. MOV AX, 0203 // AX=0203
MOV BL, 04 // BL=04
DIV BL // AL=0203/04=50 (i.e. AL=50 & AH=03)

IDIV operand

 Signed Division.
 Operand may be register or memory.
 Operand contents are negatively signed.
 Operand may be general purpose register or memory location.
 AL=AX/Operand (8-bit/16-bit) & AH=Remainder.
o E.g. MOV AX, -0203 // AX=-0203
 MOV BL, 04 // BL=04
 IDIV BL // AL=-0203/04=-50 (i.e. AL=-50 &AH=03)

LOGICAL (or) Bit Manipulation Instructions

 These instructions are used at the bit level.


 These instructions can be used for:
 Testing a zero bit
 Set or reset a bit
 Shift bits across registers

AND

– Especially used in clearing certain bits (masking) xxxx xxxx AND 0000 1111 = 0000 xxxx

(clear the first four bits)

– Examples: AND BL, 0FH

• OR

– Used in setting certain bits . xxxx xxxx OR 0000 1111 = xxxx 1111(Set the upper four bits)

XOR

– Used in Inverting bits xxxx xxxx XOR 0000 1111 = xxxxx’x’x’x’

-Example: Clear bits 0 and 1, set bits 6 and 7, invert bit 5 of register CL:

AND CL, FCH ; 1111 1100B

OR CL, C0H ; 1100 0000B

XOR CL, 20H ; 0010 0000B

SHL Instruction

The SHL (shift left) instruction performs a logical left shift on the destination operand, filling
the lowest bit with 0.

SHR Instruction

 The SHR (shift right) instruction performs a logical right shift on the destination operand.
The highest bit position is filled with a zero.
SAR Instruction

SAR (shift arithmetic right) performs a right arithmetic shift on the destination operand.

Shifting left n bits multiplies the operand by 2n.

For example, 5 * 22 = 20

Shifting right n bits divides the operand by 2n

For example, 80 / 23 = 10

ROL Instruction

 ROL (rotate) shifts each bit to the left


 The highest bit is copied into both the Carry flag and into the lowest bit
 No bits are lost
ROR Instruction
 ROR (rotate right) shifts each bit to the right
 The lowest bit is copied into both the Carry flag and into the highest bit
 No bits are lost

RCL Instruction

 RCL (rotate carry left) shifts each bit to the left


 Copies the Carry flag to the least significant bit
 Copies the most significant bit to the Carry flag

RCR Instruction

 RCR (rotate carry right) shifts each bit to the right


 Copies the Carry flag to the most significant bit
 Copies the least significant bit to the Carry flag
Branching Instructions (or) Program Execution Transfer Instructions

 These instructions cause change in the sequence of the execution of instruction.


 This change can be through a condition or sometimes unconditional.
 The conditions are represented by flags.

CALL Des:

 This instruction is used to call a subroutine or function or procedure.


 The address of next instruction after CALL is saved onto stack.
RET:
 It returns the control from procedure to calling program.
 Every CALL instruction should have a RET

JMP Des:

 This instruction is used for unconditional jump from one place to another.

Jxx Des (Conditional Jump):

 All the conditional jumps follow some conditional statements or any instruction that
affects the flag.

Loop Des:

 This is a looping instruction.


 The number of times looping is required is placed in the CX register.
 With each iteration, the contents of CX are decremented.
 ZF is checked whether to loop again or not.
String Instructions

 String in assembly language is just a sequentially stored bytes or words.


 There are very strong set of string instructions in 8086.
 By using these string instructions, the size of the program is considerably reduced.

CMPS Des, Src:

 It compares the string bytes or words.

SCAS String:

 It scans a string.
 It compares the String with byte in AL or with word in AX.

MOVS / MOVSB / MOVSW:

 It causes moving of byte or word from one string to another.


 In this instruction, the source string is in Data Segment and destination string is in Extra
Segment.
 SI and DI store the offset values for source and destination index.

REP (Repeat):

 This is an instruction prefix.


 It causes the repetition of the instruction until CX becomes zero.

E.g.: REP MOVSB STR1, STR2

 It copies byte by byte contents.


 REP repeats the operation MOVSB until CX becomes zero.

Processor Control Instructions

 These instructions control the processor itself.


 8086 allows to control certain control flags that:
 causes the processing in a certain direction
 processor synchronization if more than one microprocessor attached.

STC: It sets the carry flag to 1.

CLC: It clears the carry flag to 0.

CMC: It complements the carry flag.

STD:

 It sets the direction flag to 1.


 If it is set, string bytes are accessed from higher memory address to lower memory
address.

CLD:

 It clears the direction flag to 0.


 If it is reset, the string bytes are accessed from lower memory address to higher
memory address.

HLT instruction – HALT processing

The HLT instruction will cause the 8086 to stop fetching and executing instructions.

NOP instruction

this instruction simply takes up three clock cycles and does no processing.

LOCK instruction:this is a prefix to an instruction. This prefix makes sure that during
execution of the instruction, control of system bus is not taken by other microprocessor.

WAIT instruction

this instruction takes 8086 to an idle condition. The CPU will not do any processing during
this.
Assembler Directives

ASSUME Directive - The ASSUME directive is used to tell the assembler that the name of the
logical segment should be used for a specified segment.

• DB(define byte) - DB directive is used to declare a byte type variable or to store a byte in
memory location.

• DW(define word) - The DW directive is used to define a variable of type word or to reserve
storage location of type word in memory.

DD(define double word) :This directive is used to declare a variable of type double word or

restore memory locations which can be accessed as type double word.

• DQ (define quadword) :This directive is used to tell the assembler to declare a variable 4

words in length or to reserve 4 words of storage in memory .


• DT (define ten bytes):It is used to inform the assembler to define a variable which is 10

bytes in length or to reserve 10 bytes of storage in memory.

END- End program .This directive indicates the assembler that this is the end of the program
module. The assembler ignores any statements after an END directive.

• ENDP- End procedure: It indicates the end of the procedure (subroutine) to the assembler.

• ENDS-End Segment: This directive is used with the name of the segment to indicate the end of
that logical segment.

• EQU - This EQU directive is used to give a name to some value or to a symbol.

PROC - The PROC directive is used to identify the start of a procedure.

• PTR -This PTR operator is used to assign a specific type of a variable or to a label.

• ORG -Originate : The ORG statement changes the starting offset address of the data.

Modular Programming
Generally , industry-programming projects consist of thousands of lines of instructions or
operation code.

• The size of the modules are reduced to a humanly comprehensible and manageable level.

• Program is composed from several smaller modules. Modules could be developed by separate
teams concurrently.OBJ modules(Object modules).

• The .OBJ modules so produced are combined using a LINK program.

• Modular programming techniques simplify the software development process

CHARACTERISTICS of module:

1. Each module is independent of other modules.

2. Each module has one input and one output.

3. A module is small in size.

4. Programming a single function per module is a goal

Advantages of Modular Programming:

• It is easy to write, test and debug a module.


• Code can be reused.

• The programmer can divide tasks.

• Re-usable Modules can be re-used within a program

DRAWBACKS:

Modular programming requires extra time and memory.

MODULAR PROGRAMMING:

1.LINKING & RELOCATION

2.STACKS

3.Procedures

4.Interrupts & Interrupt Routines

5.Macros

LINKING & RELOCATION

LINKER

• A linker is a program used to join together several object files into one large object file.

• The linker produces a link file which contains the binary codes for all the combined modules.

The linker program is invoked using the following options.

C> LINK or C>LINK MS.OBJ

The loader is a part of the operating system and places codes into the memory after reading the
‘.exe’ file

A program called locator reallocates the linked file and creates a file for permanent location of
codes in a standard format.

Loader

->Loader is a utility program which takes object code as input prepares it for execution and loads
the executable code into the memory .

->Loader is actually responsible for initializing the process of execution.

Functions of loaders: 1.It allocates the space for program in the memory(Allocation)
2.It resolves the code between the object modules(Linking)

3. some address dependent locations in the program, address constants must be adjusted
according to allocated space(Relocation)

4. It also places all the machine instructions and data of corresponding programs and subroutines
into the memory .(Loading)

Relocating loader (BSS Loader)

• When a single subroutine is changed then all the subroutine needs to be reassembled.

• The binary symbolic subroutine (BSS) loader used in IBM 7094 machine is relocating loader.

• In BSS loader there are many procedure segments

• The assembler reads one sourced program and assembles each procedure segment
independently
The output of the relocating loader is the object program

• The assembler takes the source program as input; this source program may call some external
routines.

SEGMENT COMBINATION:

ASM-86 assembler regulating the way segments with the same name are concatenated &
sometimes they are overlaid.

Procedures

Procedure is a part of code that can be called from your program in order to make some specific
task. Procedures make program more structural and easier to understand.

• syntax for procedure declaration:

name PROC

…………. ; here goes the code

…………. ; of the procedure ...

RET

name ENDP

here PROC is the procedure name.(used in top & bottom)

RET - used to return from OS. CALL-call a procedure

PROC & ENDP – complier directives

CALL & RET – instructions

STACK:

Stack is an area of memory for keeping temporary data.

• STACK is used by CALL & RET instructions.

PUSH -stores 16 bit value in the stack.

POP -gets 16 bit value from the stack.

• PUSH and POP instruction are especially useful because we don't have too much registers to
operate

1. Store original value of the register in stack (using PUSH).


2. Use the register for any purpose.

3. Restore the original value of the register from stack (using POP).

MACROS:

Macros are just like procedures, but not really.

• Macros exist only until your code is compiled

• After compilation all macros are replaced with real instructions

• several macros to make coding easier(Reduce large & complex programs)

Example (Macro definition)

name MACRO [parameters,...]

<instructions>

ENDM

INTERRUPTS & INTERRUPT SERVICE ROUTINE(ISR)

‘Interrupts’ is to break the sequence of operation.

• While the CPU is executing a program, on ‘interrupt’ breaks the normal sequence of execution
of instructions, diverts its execution to some other program called Interrupt Service Routine
(ISR)
Maskable Interrupt: An Interrupt that can be disabled or ignored by the instructions of CPU are
called as Maskable Interrupt.

• Non- Maskable Interrupt: An interrupt that cannot be disabled or ignored by the instructions of
CPU are called as Non- Maskable Interrupt.

• Software interrupts are machine instructions that amount to a call to the designated interrupt
subroutine, usually identified by interrupt number. Ex: INT0 - INT255
INTERRUPT VECTOR TABLE

256 INTERRUPTS OF 8086 ARE DIVIDED IN TO 3 GROUPS

1. TYPE 0 TO TYPE 4 INTERRUPTS These Are Used For Fixed Operations And Hence Are
Called Dedicated Interrupts

2. TYPE 5 TO TYPE 31 INTERRUPTS

Not Used By 8086,reserved For Higher Processors Like 80286 80386 Etc

3. TYPE 32 TO 255 INTERRUPTS

Available For User, called User Defined Interrupts These Can Be H/W Interrupts And Activated
Through Intr Line Or Can Be S/W Interrupts.

Type – 0 Divide Error Interrupt

Quotient is too large cant be fit in AL/AX or Divide By Zero {AX/0=∞}


Type –1 Single Step Interrupt

used for executing the program in single step mode by setting Trap Flag

To Set Trap Flag PUSHF

MOV BP,SP

OR [BP+0],0100H;SET BIT8

POPF

Type – 2 Non Maskable Interrupt

This Interrupt is used for executing ISR of NMI Pin (Positive Egde Signal). NMI cant be masked
by S/W

Type – 3 Break Point Interrupt: used for providing BREAK POINTS in the program

Type – 4 Over Flow Interrupt :used to handle any Overflow Error after signed arithmetic

Vous aimerez peut-être aussi