I'm making a program that converts multiple lowercase letter to its uppercase equivalent.
For example, the output I want would be:
Input a letter: asddf
The uppercase equivalent of letter asddf is ASDDF
But it only gets and print the last character like this:
Input a letter: asddf
The uppercase equivalent of letter fffff is FFFFF
How do i fix this? I am aware that my code is incorrect, but I don't know which part where I went wrong because I'm still new to the language. Thanks!
Here's my code:
org 100h
LEA DX, lowercase
MOV AH, 9
INT 21H
MOV CX, 5
MOV AH, 1
@LOOP:
INT 21H
LOOP @LOOP
MOV BL, AL
LEA DX, uppercase
MOV AH, 9
INT 21H
MOV DL, BH
MOV AH, 02H
INT 21h
MOV CX, 5
MOV DL, BL
MOV AH, 02H
@LOOP2:
INT 21h
LOOP @LOOP2
LEA DX, uppercase_
MOV AH, 9
INT 21H
SUB BL, 20H
MOV CX, 5
MOV AH, 2
MOV DL, BL
@LOOP3:
INT 21H
LOOP @LOOP3
MOV AH, 4CH
INT 21H
ret
lowercase db "Input a letter: $"
uppercase db 0AH, 0DH, "The uppercase equivalent of letter$"
uppercase_ db " is $"