Wase 5
Wase 5
Purushotham BV
Asst. Prof.
Department of CSE
DSCE, Bangalore – 78
94489 19064
[email protected]
8086 – Microprocessor
Architecture
Addressing Modes
Instructions
Programming
IP
BIU
AH AL
Control circuitry and
BH BL 16-bit adder instruction decoder
CH CL
DH DL
SP
BP
SI FLAGS EU
DI
P(parity)
.EXIT
END
Types
Data movement
Arithmetic & Logical
Program control
Data movement involves transfer between
register and a memory location, immediate,
I/O, stack
MOV AX, BX
MOV DS:246H[BP], DX
MOV AX, 25H
MOV LOC, 1234H
MOV AX,DS:34H;
MOV SS:34H, AL;
MOV LOC, AX
MOV DS, BX
MOV SS,1234H[BX+SI]
PUSH SI; Before After
(SI) 1234 1234
(SP) 5678 5676
(SS:5676) C5 34
(SS:5677) B2 12
PUSH 83H[SI]
PUSH DS
PUSHF
POP SI
POP 83H[SI]
POPF
XCHG AX, SI;
XCHG AX,AX;
XCHG BL, 83H[SI]
IN AL, 83H
IN AL, DX
OUT 83H, AX
OUT DX, AL
LEA BX,83H[SI]; BX <- EA
LEA CX,LOCN
LDS BX,82H[SI]; load a register and DS with the
contents of two memory
Before After
(SI) 4600 4600
(DS:4682) 5683 5683
(DS:4684) 6789 6789
(BX) 1234 5683
(DS) 3456 6789
SHR CX,1
SHR BYTE DS:0F246H[BP], CL
SHL CX, 1;SHL BYTE DS:0F246H[BP],CL
SAR CX,1; shift arithmetic right with sign bit
SAR BYTE DS:0F246H[BP], CL
SAL CX,1;
Architecture of 8086
Addressing modes
Instructions
Assembly Language Programming Examples