Exp 3
Exp 3
.data
; Step 3: Print the character back
message db "Enter a letter: $" ; This is the text to show lea dx, newline ; Move to a new line
the user
mov ah, 09h ; Display the newline
newline db 0Dh, 0Ah, '$' ; Newline characters (go to int 21h ; Call interrupt
the next line)
mov dl, bl
.code ; Move the stored character to DL
main proc mov ah, 02h ; Function to print a character
mov ax, @data ; Initialize data segment int 21h ; Call interrupt
mov ds, ax
; Step 4: Exit the program
mov ah, 4Ch ; End the program
; Step 1: Display the message int 21h ; Call interrupt
lea dx, message ; Load the address of the message main endp
mov ah, 09h ; Function to display a string end main
int 21h ; Call interrupt (magic spell!)
3. Write a program that will display uppercase letters (A-Z), using loop
on new line.