Question

Your assignment is to write an assembly language program which read a string and print it in uppercase. This program asks the user to enter a string which is subsequently displayed in uppercase. It is…

Your assignment is to write an assembly language
program which read a string and print it in uppercase. This
program asks the user to enter a string which is subsequently
displayed in uppercase. It is important to first ensure that string
to be converted is in the a-z range. The program does not recognize
any space, symbols or any kind of punctuation marks. Any time the
user enters any of this character the program is going to
repeatedly ask for the valid string.
An  example execution of your program could be:
Please enter your string: 1winter
Invalid Entry!
Please enter your string: summer
Your capitalized string:SUMMER
**ARM LANGUAGE**

Solutions

Expert Solution

DATA SEGMENT

MSG1 DB 10,13,'enter any string:-$'

MSG2 DB 10,13,'converted string is:-$'

P1 LABEL BYTE

M1 DB 0FFH

L1 DB?

P11 DB 0FFH DUP<'$'>

DATA ENDS

DISPLAY MARCO MSG

MOV AH,9

LEA DX,MSG

INT 21H

ENDM

CODE SEGMENT

ASSUME CS: CODE,DS:DATA

START:

MOV AX,DATA

MOV DS,AX

DISPLAY MSG1

LEA DX,P1

MOV AH,0AH

INT 21H

DISPLAY MSG2

LEA SI,P1

MOV CL,L1

MOV CH,0

CHECK:

CMP[SI],61H

JB DONE

CMP[SI],5BH

UPR: SUB[SI],20H

DONE: INC SI

LOOP CHECK

DISPLAY P11

MOV AH,4CH

INT 21H

CODE ENDS

END START


Submit Your Answer