Professional Documents
Culture Documents
Lec - 4 Micro Must
Lec - 4 Micro Must
Lec - 4 Micro Must
8086
MICROPROCESSORS
Lec.4
Dr. Abdallah Ramadan Fawzy
E-Mail: Abdallah.gad@must.edu.eg
The figures and text included in slides are borrowed from various books, websites, and
other sources for academic purposes only. The author do not claim any originality.
MICROPROCESSORS
8086
❖Arithmetic Instructions
❖Logical Instructions
❖Branching Instructions
❖Control Instructions
Data Transfer Instructions
The contents of either the register pair or the memory location are
not altered.
Example: LDAX B
Data Transfer Instructions
Example: STAX B
Data Transfer Instructions
Example: XCHG
Data Transfer Instructions
Example: PUSH B
Data Transfer Instructions
Example: POP H
Data Transfer Instructions
Example: OUT 78 H
Data Transfer Instructions
Example: IN 8C H
Arithmetic Instructions
❖ Addition
❖ Subtract
❖ Increment
❖ Decrement
Addition
The contents of register or memory and Carry Flag (CY) are added to the
contents of accumulator.
Example: ADI 45 H
Arithmetic Instructions
The 8-bit data and the Carry Flag (CY) are added to the
contents of accumulator.
Example: ACI 45 H
Arithmetic Instructions
The contents of the register or memory location are subtracted from the
contents of the accumulator.
The contents of the register or memory location and Borrow Flag (i.e. CY)
are subtracted from the contents of the accumulator.
Example: SUI 45 H
Arithmetic Instructions
The 8-bit data and the Borrow Flag (i.e. CY) is subtracted
from the contents of the accumulator.
Example: SBI 45 H
Arithmetic Instructions
Example: INX H
Arithmetic Instructions
Copy A toC
• Copy A to register C
• Stop processing
Stop
5. Assembly Language Program
1. Get two numbers
a) Load 1st no. in register D MVI D, 2H
b) Load 2nd no. in register E MVI E, 3H
2. Add them
a) Copy register D to A MOV A, D
b) Add register E to A ADD E
3. Store result
a) Copy A to register C MOV C, A
4. Stop
a) Stop processing HLT