Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Indian Institute of Information Technology Design and Manufacturing

Kancheepuram
Department of Mechanical Engineering
MPMC LAB REPORT

Addressing modes in 8086 Microprocessor

ROLL N0: MPD19I002


ANAND
DATE: 07-03-2022
Aim:
To get familiar with 8086 Microprocessor and its different register modes and perform
Hexadecimal addition and Subtraction
Apparatus:
8086 Assembler and DOS BOX Software
Work Done:
Perform the 16-bit addition without carry and subtraction without borrow of two number.
Theory:
The 8086 microprocessor some types of instructions −
 Data Transfer Instructions
 Arithmetic Instructions
 Bit Manipulation Instructions
 String Instructions
 Program Execution Transfer Instructions (Branch & Loop Instructions)
 Processor Control Instructions
 Iteration Control Instructions
 Interrupt Instructions
Instruction to transfer a word:
 MOV − Used to copy the byte or word from the provided source to the provided
destination.
Instructions to perform addition:
 ADD − Used to add the provided byte to byte/word to word.
 ADC − Used to add with carry.
Instructions to perform subtraction:
 SUB − Used to subtract the byte from byte/word from word.
 SBB − Used to perform subtraction with borrow.
Interrupt Instructions:
These instructions are used to call the interrupt during program execution.
 INT − Used to interrupt the program during execution and calling service specified.
Code:
ASSUME CS:CODE, DS:DATA
DATA SEGMENT
A DW 2222H
B DW 3333H
DATA ENDS
CODE SEGMENT
START:
MOV AX,DATA
MOV DS,AX
MOV AX,A
MOV BX,B
ADD AX,BX
INT 03H
CODE ENDS
END START

16-bit Addition without Carry:


Code:
ASSUME CS:CODE, DS:DATA
DATA SEGMENT
A DW 2222H
B DW 3333H
DATA ENDS
CODE SEGMENT
START:
MOV AX,DATA
MOV DS,AX
MOV AX,A
MOV BX,B
SUB AX,BX
INT 03H
CODE ENDS
END START

16-bit Substation without borrow:


Code:
ASSUME CS:CODE, DS:DATA
DATA SEGMENT
A DW 2222H
B DW 3333H
DATA ENDS
CODE SEGMENT
START:
MOV AX,DATA
MOV DS,AX
MOV AX,A
MOV BX,B
ADC AX,BX
ADC AX,CX
INT 03H
CODE ENDS
END START

16-bit Addition with Carry:


Code:
ASSUME CS:CODE, DS:DATA
DATA SEGMENT
A DW 2222H
B DW 3333H
DATA ENDS
CODE SEGMENT
START:
MOV AX,DATA
MOV DS,AX
MOV AX,A
MOV BX,B
SBB AX,BX
SBB AX,CX
INT 03H
CODE ENDS
END START

16-bit Substation with borrow:


Calculation:

INPUT OUTPUT
ADD AX,BX
Register Data Register Data
AX 2222H AX 5555
BX 3333H
OUTPUT ADC AX, BX & ADC AX, CX
AX 2222H1 AX 5555
BX 3333H AX 5576
SUB AX, BX
AX 2222H AX EEEF
BX 3333H AX
OUTPUT SUB AX, BX & SBB AX, CX
AX 2222H AX EEEF
BX 3333H AX EECD
Conclusion:
Understood the various addressing modes of 8086 Microprocessor and got familiar with DOS
box and its Syntax. Performed 16-bit Hexadecimal addition and subtraction without carry and
observed the output

You might also like