8086 Microprocessor Assembly Language Programming: Dr. Mohsen NASRI
8086 Microprocessor Assembly Language Programming: Dr. Mohsen NASRI
8086 Microprocessor Assembly Language Programming: Dr. Mohsen NASRI
Fourth Generation
During 1980s
Low power version of HMOS technology
(HCMOS)
Third Generation 32 bit processors
During 1978 Physical memory space 224 bytes = 16 Mb
HMOS technology Faster speed, Higher Virtual memory space 240 bytes = 1 Tb
packing density Floating point hardware
16 bit processors 40/ 48/ 64 pins Supports increased number of addressing
Easier to program modes
Dynamically relatable programs
Processor has multiply/ divide arithmetic Intel 80386
hardware
More powerful interrupt handling
capabilities Second Generation
Flexible I/O port addressing During 1973
NMOS technology Faster speed, Higher
Intel 8086 (16 bit processor) density, Compatible with TTL
4 / 8/ 16 bit processors 40 pins
First Generation Ability to address large memory spaces
Between 1971 – 1973 and I/O ports
PMOS technology, non compatible with TTL Greater number of levels of subroutine
4 bit processors 16 pins nesting
8 and 16 bit processors 40 pins Better interrupt handling capabilities
Due to limitations of pins, signals are
multiplexed Intel 8085 (8 bit processor)
Functional blocks
AD0-AD15 (Bidirectional)
Address/Data bus
MN/ MX
MINIMUM / MAXIMUM
TEST
READY
RESET (Input)
CLK
Pins 24 -31
Pins 24 -31
Dedicated Adder to
generate 20 bit address
Instruction queue
A group of First-In-First-
Out (FIFO) in which up to
6 bytes of instruction
code are pre fetched
from the memory ahead
of time.
EU decodes and
executes instructions.
A decoder in the EU
control system
translates instructions.
and
Some of the 16 bit registers can be
Index registers (Source used as two 8 bit registers as :
Index, Destination Index)
each of 16-bits AX can be used as AH and AL
BX can be used as BH and BL
CX can be used as CH and CL
DX can be used as DH and DL
8086 microprocessor Architecture Execution Unit (EU)
Example:
This flag is set, when the This flag is set, if the result of This flag is set to 1, if the lower
result of any computation the computation or comparison byte of the result contains even
is negative performed by an instruction is number of 1’s ; for odd number
zero of 1’s set to zero.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OF DF IF TF SF ZF AF PF CF
Tarp Flag
Over flow Flag If this flag is set, the processor
This flag is set, if an overflow occurs, i.e, if the result of a signed enters the single step execution
operation is large enough to accommodate in a destination
mode by generating internal
register. The result is of more than 7-bits in size in case of 8-bit
signed operation and more than 15-bits in size in case of 16-bit interrupts after the execution of
sign operations, then the overflow will be set. each instruction
8086 registers
categorized 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
into 4 groups OF DF IF TF SF ZF AF PF CF
8086 : 16-bit
Bank 0 : A0 = 0 Even
addressed memory bank
Bank 1 : = 0 Odd
addressed memory bank
8086 microprocessor Memory organization in 8086
Computer language
1. Register Addressing
Group I : Addressing modes for
2. Immediate Addressing register and immediate data
3. Direct Addressing
5. Based Addressing
Group II : Addressing modes for
6. Indexed Addressing memory data
7. Based Index Addressing
8. String Addressing
Example:
MOV CL, DH
(CL) (DH)
8086 Addressing Modes
Microprocessor
Register Addressing
8086 Addressing Modes
Microprocessor
Register Addressing
MOV AX,1
MOV BX, AX
immediate
Register
8086 Addressing Modes
Microprocessor
Register Addressing
#3:
lue less than FFH is moved into a 16-bit register, the rest of the
e assumed to be all zeros.
MOV BX, 5 BX =0005
BH = 00, BL = 05
8086 Addressing Modes
Microprocessor
Immediate Addressing
Example:
(DL) 08H
(AX) 0A9FH
8086
Microprocessor Addressing Modes
Direct Addressing
Example:
Example:
INC Operand
Operand+1 Operand
Arithmetic Instructions-ADD, ADC, INC
Operand1-Operand2 0perand1
DEC Operand
Operand-1 Operand
Arithmetic Instructions-ADD, ADC, INC
Multiplication and Division
Multiplication and Division
Multiplication and Division
Multiplication and Division
Thank You
Have a Nice
Day