8086
8086
8086 FEATURES
8086 is a 16-bit processor 16-bit Arithmetic Logic Unit 16-bit data bus 20-bit address bus - 220 = 1,048,576 = 1 Mb So it can directly access 1,048,576 memory locations. Each of these locations are a byte wide. Therefore 16 bit words are stored in two consecutive memory locations.
8086 FEATURES
It provides fourteen 16-bit registers. A powerful set of registers. It can generate 16-bit I/O addresses, hence can access 216 = 65,536 I/O ports. Clock rates: 5 MHZ for 8086 8 MHz for 8086 2 10 MHz for 8086 1
8086-ARCHITECTURE
BIU
Functions: It sends address of the memory or I/O It fetches instruction from memory It reads data from port/memory It writes data from port/memory It supports instruction queuing.
EU-Execution Unit
This unit tells the BIU from where to fetch the instructions or data, decodes instructions and executes instructions. It contains: Control unit Instruction decoder ALU Flag registers General purpose registers Pointers and Index registers
EU
The EU contains the following registers: AX The Accumulator BX The Base register CX The Count register DX The Data register SP- The Stack Pointer BP The Base Pointer SI The Source Index DI The Destination Index
REGISTER ORGANIZATION
General purpose registers - AX,BX,CX,DX Segment registers -CS,DS,SS,ES Pointers and Index registers
SP,BP,IP and SI,DI
ES CS SS DS IP AX BX CX DX AH BH CH DH SP BP SI DI FLAGS AL BL CL DL
Extra Segment Code Segment Stack Segment Data Segment Instruction Pointer Accumulator Base Register Count Register Data Register Stack Pointer Base Pointer Source Index Register Destination Index Register
Exercise
Determine the contents of the status flags after the execution of the following: a) MOV BX, 65D1H MOV AX, 2359H ADD BX, AX b) MOV BL, 96H MOV AL, BCH SUB AL, BL
Addressing Modes
Addressing Modes which are common to 8085 processor. Immediate Addressing Mode. Register Addressing Mode. Direct addressing Mode. Register Indirect Addressing Mode.
MOV AH,4CH
MOV DX,1000H
Exercise
Identify the addressing mode used for the source and the destination operands in the following 8086 microprocessor instructions: 1. MOV AL, BL 2. MOV AL, 20H 3. MOV AL,[3000H] 4. MOV BX, [CX] 5. MOV CL, BL 6. MOV AX, 1234H 7.MOV CL,BL 8. MOV CL, [9823H] 9. MOV CX, 4567H 10. MOV DX, [AX]
Addressing Modes
Addressing modes which are new to 8086 processor. Indexed Addressing Mode Based Indexed Addressing Modes Based Relative Addressing Mode Based Index Plus Relative Addressing Mode
Exercise
Identify the addressing mode used for the source and the destination operands in the following 8086 microprocessor instructions: 1. MOV AH, [BP]+12 2. MOV DL, [DI] 3. MOV CX, [DI][BX]+5 4.MOV DX, [BX]+3 5. MOV CX, [BX]+[DI] 6.MOV AL, [BX]+[SI]+10
Exercise
Debug the following 8086 microprocessor instructions: a) MOV DS, 4D23H
b) MOV CH,[BX]+[BX]+6 c) MOV AL,[SI][DI]+4