25 - Dikshant Solanki - AMC - EXP 1

You might also like

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

VIDYAVARDHINI’S COLLEGE OF ENGINEERING AND TECHNOLOGY

DEPARTMENT OF INSTRUMENTATION

NAME :- Dikshant Solanki

ROLL NO :- 25

EXP NO :- 01

D.O.P :-

D.O.S :- 14/10/2021

SIGN :-

EXPERIMENT NO.1
VIDYAVARDHINI’S COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPARTMENT OF INSTRUMENTATION

AIM: To write an assembly language program for 16 bit arithmetic operation.

APPARATUS REQUIRED: Editor like Keil µvision version 4 or less

PROCEDURE:

1. Program is edited and is compiled with Keil compiler.

2. After successful compilation, debugging is started.

3. The memory window is accessed and the input data are entered and the output is seen as

shown in the result.

ALGORITHM:

16 bit Addition:

1. Start

2. Move the data into A register & R0 register.

3. Add the data from register A & R0.

4. Save the addition result into register R1 by moving the addition result from A register

(lower byte).

5. Move the data into A register & R2 register.

6. Add the data from register A & R2.

7. Save the addition result into register R3 by moving the addition result from A register (higher

byte).

16 bit Addition:-
VIDYAVARDHINI’S COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPARTMENT OF INSTRUMENTATION

ORG 0000H

MOV A,#25H ;move 25H in A register

MOV R0,#0CDH ;move CDH in R0 register

ADD A,R0 ;Add A & R0 register data

MOV R1, A ;move A(addition lower byte Result) into R1 register

MOV A, #3AH ;move 3AH in A register

MOV R2, #0ABH ;move ABH in R2 register

ADDC A, R2 ;Add A & R2 register data

MOV R3, A ;move A(addition higher byte Result) into R3 register

END

RESULT:-
VIDYAVARDHINI’S COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPARTMENT OF INSTRUMENTATION

CONCLUSION: - Thus we have performed 16 bit arithmetic operation .

You might also like