Experiment 5
Experiment 5
Submitted by Submitted to
MOV AH,9H
LEA DX,STR
INT 21H
MOV AH,9H
LEA DX,STR1
INT 21H
MAIN ENDP
END MAIN
Output on Display:
Problem 02: Take a small letter and convert it to Capital letter in new line.
Codes:
.MODEL SMALL
.STACK 100H
.DATA
CR EQU 0DH
LF EQU 0AH
MSG1 DB 'ENTER A LOWER CASE LETTER: $'
MSG2 DB 0DH,0AH,'IN UPPER CASE IT IS: '
CHAR DB ?,'$'
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,20H
MOV CHAR,AL
LEA DX,MSG2
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
Output on Display:
Problem 03: Input a string from user and display each character in vertically.
Codes:
.MODEL SMALL
.DATA
.CODE
MAIN PROC
MOV BX,0000H
MOV CX,6
LOOP1:
MOV AH,1H
INT 21H
MOV [BX],AL
INC BX
LOOP LOOP1
MOV BX,0000H
MOV CX,6
LOOP2:
MOV AH,2H
MOV DL,10D
INT 21H
MOV DL,0DH
INT 21H
MOV DX,[BX]
INC BX
INT 21H
LOOP LOOP2
EXIT:
MOV AH,04CH
INT 21H
MAIN ENDP
END MAIN
Output on Display:
Discussion & Conclusion: This program showcases the utilization of DOS interrupt
routines to perform simple yet fundamental input/output operations. It highlights the
versatility and convenience of DOS routines, enabling assembly language programs to
interact with the user through messages and character input. Understanding and
applying these routines in assembly language programming is a crucial skill for
developing efficient and interactive software applications. The program's structure
serves as a foundation for more complex applications, where user interaction and
character input are integral to the functionality of the software.