Friday, November 14, 2014

Program to show the result of addition of two numbers


Objectives
-to learn to create an assembly language program for addition
-to learn to add two numbers
-to learn how to keep data (number) using variables
-to learn the uses of variables
-to learn to use the data of variables
-to understand the uses of SUM operation
addition using assembly program,primary level programming,uses of arrays
.MODEL SMALL
.STACK 100H
.DATA
A DW 2
B DW 6
SUM DW ?

.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX

MOV AX,A
ADD AX,B
MOV SUM,AX

MOV AX,4CH
INT 21H

MAIN ENDP
END MAIN

No comments:

Post a Comment