Assembly Language Project Report
Simple Addition Calculator in Assembly Language
1. Abstract
This project is a simple calculator program written in Assembly language. It allows the user to input two
single-digit numbers, adds them, and displays the result. The goal is to demonstrate basic input, output, and
arithmetic operations in Assembly.
2. Objective
The objective of this project is to understand how to perform simple arithmetic operations and handle user
input/output in Assembly language.
3. Project Description
The program prompts the user to input two numbers. It converts ASCII input to numeric values, performs
addition, and then converts the result back to ASCII for displaying.
4. Code
.model small
.stack 100h
.data
msg1 db 'Enter first digit: $'
msg2 db 0Dh,0Ah,'Enter second digit: $'
msg3 db 0Dh,0Ah,'Result is: $'
.code
main proc
mov ax, @data
mov ds, ax
; Display msg1
lea dx, msg1
mov ah, 9
Page 1
Assembly Language Project Report
int 21h
; Input first digit
mov ah, 1
int 21h
sub al, '0'
mov bl, al
; Display msg2
lea dx, msg2
mov ah, 9
int 21h
; Input second digit
mov ah, 1
int 21h
sub al, '0'
; Add digits
add al, bl
; Convert result to ASCII
add al, '0'
; Display msg3
lea dx, msg3
mov ah, 9
int 21h
; Display result
mov dl, al
mov ah, 2
Page 2
Assembly Language Project Report
int 21h
; Exit
mov ah, 4Ch
int 21h
main endp
end main
5. Output
The program prompts the user twice to input single digits. After entering both numbers, it displays the sum.
For example, if the user enters 3 and 5, the output will be 'Result is: 8'.
6. Improvement Scope
The program can be improved by handling multi-digit numbers, adding subtraction, multiplication, and division
functions, and handling invalid input.
7. Conclusion
This project demonstrates the basics of Assembly language, including data handling, arithmetic operations,
and user interaction through simple I/O.
Page 3