Read a line of lower-case letters and spaces and print it in capital letters.
Input
One line of 1 to 60 characters, each a lower-case letter or a space.
Output
The same line with every letter in capitals.
Examples
Example 1 · Input
hello
Expected output
HELLO
Example 2 · Input
assembly language
Expected output
ASSEMBLY LANGUAGE
Hints
Hint 1
Read one key at a time with AH = 1 until AL is 0Dh (Enter).
Hint 2
A lower-case letter becomes its capital when bit 5 is cleared: AND AL, 0DFH.
Hint 3
Spaces must stay spaces: only change characters from 'a' to 'z' (CMP and conditional jumps).
Solution
Show one correct solution (try it yourself first)
; Shout it
.MODEL SMALL
.STACK 100H
.CODE
MAIN PROC
NEXT:
MOV AH, 1
INT 21H
CMP AL, 0DH ; Enter ends the line
JE DONE
CMP AL, 'a'
JB SHOWIT
CMP AL, 'z'
JA SHOWIT
AND AL, 0DFH ; clear bit 5: a capital letter
SHOWIT:
MOV DL, AL
MOV AH, 2
INT 21H
JMP NEXT
DONE:
MOV AH, 4CH
INT 21H
MAIN ENDP
END MAIN