Question

Your assignment is to write an assembly language program which read a string and print it in...

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**

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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

Add a comment
Know the answer?
Add Answer to:
Your assignment is to write an assembly language program which read a string and print it in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 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...

  • 2. Searching a String: Write a MIPS assembly language program to do the following: Read a...

    2. Searching a String: Write a MIPS assembly language program to do the following: Read a string and store it in memory. Limit the string length to 100 characters. Then, ask the user to enter a character. Search and count the number of occurrences of the character in the string. The search is not case sensitive. Lowercase and uppercase letters should be equal. Then ask the user to enter a string of two characters. Search and count the number of...

  • Write a program(Python language for the following three questions), with comments, to do the following:   ...

    Write a program(Python language for the following three questions), with comments, to do the following:    Ask the user to enter an alphabetic string and assign the input to a variable str1. Print str1. Check if str1 is valid, i.e. consists of only alphabetic characters. If str1 is valid Print “<str1> is a valid string.” If the first character of str1 is uppercase, print the entire string in uppercase, with a suitable message. If the first character of str1 is...

  • Objectives: Use strings and string library functions. Write a program that asks the user to enter...

    Objectives: Use strings and string library functions. Write a program that asks the user to enter a string and output the string in all uppercase letters. The program should then display the number of white space characters in the string. You program should run continuously until the user enters an empty string. The program must use the following two functions: A function called count_spaces that counts the number of white spaces inside a string. int count_space(char str[]); which tell you...

  • MIPS ASSEMBLY PROGRAM: PLEASE Write in MIPS Assembly language. Take strings as input and calculate and...

    MIPS ASSEMBLY PROGRAM: PLEASE Write in MIPS Assembly language. Take strings as input and calculate and print a simple checksum for each string. Make your string long enough to hold 50 characters. Don't forget to leave space for the null byte. Our checksum algorithm will produce a value which you can print with the syscall for printing a character. Stop reading strings when the user enters ".". The syscall to read a string (sycall code 8) adds a newline to...

  • Assignment 14.3: Valid Email (10 pts) image source Write a program that takes as input an...

    Assignment 14.3: Valid Email (10 pts) image source Write a program that takes as input an email address, and reports to the user whether or not the email address is valid. For the purposes of this assignment, we will consider a valid email address to be one that contains an @ symbol The program must allow the user to input as many email addresses as desired until the user enters "q" to quit. For each email entered, the program should...

  • In this program, you will be using C++ programming constructs, such as overloaded functions. Write a...

    In this program, you will be using C++ programming constructs, such as overloaded functions. Write a program that requests 3 integers from the user and displays the largest one entered. Your program will then request 3 characters from the user and display the largest character entered. If the user enters a non-alphabetic character, your program will display an error message. You must fill in the body of main() to prompt the user for input, and call the overloaded function showBiggest()...

  • Capitalization JAVA In this program, you will read a file line-by-line. For each line of data...

    Capitalization JAVA In this program, you will read a file line-by-line. For each line of data (a string), you will process the words (or tokens) of that line one at a time. Your program will capitalize each word and print them to the screen separated by a single space. You will then print a single linefeed (i.e., newline character) after processing each line – thus your program will maintain the same line breaks as the input file. Your program should...

  • Be sure to include a message to the user explaining the purpose of the program before...

    Be sure to include a message to the user explaining the purpose of the program before any other printing to the screen. Be sure to include information about which document codes are valid. Within the main method, please complete the following tasks in java program: Create a loop that allows the user to continue to enter two-character document designations until a sentinel value is entered (ex. “XX”). If the user enters a valid document code, please echo that value back...

  • For this assignment, you will create a program that tests a string to see if it...

    For this assignment, you will create a program that tests a string to see if it is a palindrome. A palindrome is a string such as “madam”, “radar”, “dad”, and “I”, that reads the same forwards and backwards. The empty string is regarded as a palindrome. Write a recursive function: bool isPalindrome(string str, int lower, int upper) that returns true if and only if the part of the string str in positions lower through upper (inclusive at both ends) is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT