Blogger Template Store

Wednesday, November 30, 2016

Assembly Language Programming Add Two Numbers

Assembly Language Programming Add Two Numbers - Assembly programming is a low level programming language. Today we are going to share project codes for student its about how to add two numbers in assembly programming language.

Another thing to say before assembly language programming add two numbers, If you are looking to get emu8086 download full version free from here, click here to download emu8086 with key.

Write An Assembly Program  to Add Two Numbers

.MODEL SMALL
.STACK 100H
.DATA
    MSG DB 'ENTER TWO VALE WHOSE SUM IS LESS THAN 10 $'
    MSG1 DB 0DH,0AH,'ENTER FIRST VALUE: $'
    MSG2 DB 0DH,0AH,'ENTER SECOND VALUE: $'
   
    MSG3 DB 0DH,0AH,'THE SUM OF '
    VAL1 DB ?, ' AND '
    VAL2 DB ? ,' IS = '
    RESULT DB ?,'$'

.CODE
    MAIN PROC
        MOV AX, @DATA
        MOV DS,AX
       
        MOV AH,9
        LEA DX,MSG
        INT 21H
        LEA DX,MSG1
        INT 21H
       
        MOV AH,1
        INT 21H
        MOV VAL1,AL
       
        MOV AH,9
        LEA DX,MSG2
        INT 21H
       
        MOV AH,1
        INT 21H
        MOV VAL2,AL
        
        ADD AL,VAL1
        SUB AL,30H
        MOV RESULT,AL
       
        MOV AH,9
        LEA DX,MSG3
        INT 21H
               
        MOV AH,4CH
        INT 21H
       
        MAIN ENDP
    END MAIN

Output of Addion of two numbers in assembly programming language

Assembly Language Programming Add Two Numbers



You Like It, Please Share This Article Using...




Don't Forget To Read This Also...




No comments :

Speak Your Mind: