Professional Documents
Culture Documents
Coal Lab 2 BSCS 5B + Output Screen Shorts
Coal Lab 2 BSCS 5B + Output Screen Shorts
LAB REPORT: 2
Submitted By: Hamza Nazir (2872)
Submitted To: Sir Faiq Ahmad Khan
DATE:——-
Bscs-40B (5th Semester) Evening
Objective:
The objective of this lab session was to gain familiarity with assembly language instructions, directives, and interrupts. Specifically,
we aimed to understand the .MODEL, .STACK, .DATA, and .CODE directives, as well as explore software interrupts for I/O operations
Activities Performed:
1. Input and Display Program:
Developed an assembly program to input a character from the user and display it using software interrupts.
Wrote an assembly program to input a lowercase letter from the user, convert it to uppercase (by subtracting 32 from the
ASCII value), and display the result
.model small
.stack 100h
.data
.code
main proc
;input
mov ah,1
int 21h
mov dl,al
sub dl,32
;Output
mov ah,2
int 21h
mov ah,4ch
int 21h
end main
main endp
Created an assembly program to input an uppercase letter, convert it to lowercase (by adding 32 to the ASCII value), and
display the result.
.model small
.stack 100h
.data
.code
main proc
;input
mov ah,1
int 21h
mov dl,al
add dl,32
mov ah,2
int 21h
mov ah,4ch
int 21h
end main
main endp
OUT PUT
Overall, the lab session provided valuable insights into the fundamentals of assembly language programming and its application in
system-level operations.