Programming: Assembly Language

This program will read a character from the keyboard and display it at the beginning of the next line.

.model small
.stack 100H
.code
Main proc
Mov ah, 02h
Mov dl, ‘A’
Int 21h
Mov ah, 4ch
Int 21h
Main endp
End main

This program begins by prompting the user to enter a lowercase letter, and on the next line displays another message with the letter in uppercase.

.model small
.stack 100H
.data
Msg1”Enter a lowercase letter:$”
.code
Main proc
Mov AX, @data
Mov DS, AX
LEA DX, 09H
INT 21H
MOV AH, 0H
INT 21H
SUB AL, 20H
MOV CL, AL
MOV AH, 02H
MOV DL, 0AH
INT 21H
MOV DL, 0AH
INT21H
MOV DL, 0DH
INT 21H
MOV AH, 09H
LEA DX, MSG2
INT 21H
MOV AH, 02H
MOV DL, CL
INT 21H
MOV AH, 4CH
INT 21H
MAIN ENDP
END MAIN

TO DOWNLOAD THE WORD DOCUMENT :
CLICK HERE

Comments