Maca Lab 3
Maca Lab 3
Lab Report
Course Code: 3204
Course Title: Computer Architecture and Microprocessor Lab
Experiment No: 03
Experiment Title: Sign Detection, Character Processing, and Arithmetic Operations in Assembly
Submitted By Submitted To
Name: Zillur Rahman Abdullah Name:Rashed Mazumder
Student ID: 2061 Designation: Faculty
Batch:50 Institute: IIT
Year: 3rd Year
Semester: 2nd Semester
mov ah, 1
int 21h
cmp al, 'y'
je display
cmp al, 'Y'
je display
jmp exit
display:
mov dl, al
mov ah, 2
int 21h
exit:
Conclusion:
The program ensures only 'y' or 'Y' characters are displayed, effectively ignoring all
other input.
4. Maximum of Two Numbers
Introduction:
This program reads two numbers and prints the larger of the two.
Description:
After comparing the two input values, the larger one is stored in DL and displayed
using DOS interrupt.
Code:
mov ah, 1
int 21h
sub al, 30h
mov bl, al
mov ah, 1
int 21h
sub al, 30h
cmp al, bl
jg second
mov dl, bl
jmp print
second:
mov dl, al
print:
add dl, 30h
mov ah, 2
int 21h
Conclusion:
This code accurately compares two numbers and outputs the greater of the two
using ASCII conversion.