Write an ASM program that prompts the user to enter a string of at most 128 characters and then displays the string in reverse order, with: cach upper-case letter converted to its corresponding lower-case letter, and cach lower-case letter converted to its corresponding upper-case letter. The program should also display the number of uppercase letters after displaying the output string, as well as the total number of characters in the string. For instance, a sample execution of "Ass2-Q3.exe" with the input string "An Input Line!" is shown below C:Programming'asm>Ass2-Q3 Enter a string of at most 128 characters: An Input Line! Here it is, with all lowercases and uppercases flipped, and in reverse order: IENII TUPNÍ Na There are 8 upper-case letters after conversion. There are 14 characters in the string. CAProgramminglasm> HINT: Solving this question in the following sequential order will be much casier, though you can solve the way you want. It is always much casier to solve a problem when you break it down into smaller problems; don't care if your code is long. 1) First, read the string from the keyboard into a memory variable. Count the number of characters while reading the string. 2) Second, convert initial Towercases to uppercases and initial uppercases to lowercases; be careful here. You can also do this while reading the string. 3) Third, count the final number of uppercases; after converting all lowercases to uppercases. You can also do this while reading the string. 4) Fourth, print the resulting string in reverse order, by using indirect addressing (or indexed addressing, if you wish). Also, be careful here since there are two possible ways: you can either reverse the initial string first then display the resulting reversed string, or you can directly display the initial string in reverse order. 5) Display the two counts. If the user enters more than 128 characters, only the first 128 characters must be processed (the rest are ignored but make sure that you cannot write outside the memory you have allocated for storing the string).

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Prouramming Exercise 3 (40 noints): [call it Ass2-Q3.asm]
Write an ASM program that prompts the user to enter a string of at most 128 characters
and then displays the string in reverse order, with: cach upper-case letter converted to its
corresponding lower-case letter, and cach lower-case letter converted to its corresponding
upper-case letter. The program should also display the number of uppercase letters after
displaying the output string, as well as the total number of characters in the string. For
instance, a sample execution of "Ass2-Q3.exe" with the input string "An Input Line!" is
shown below
C:Programminglasm>Ass2-Q3
Enter a string of at most 128 characters: An Input Line!
Here it is, with all lowercases and uppercases flipped, and in reverse order:
!ENII TUPNI Na
There are 8 upper-case letters after conversion.
There are 14 characters in the string.
C:Programminglasm>
HINT: Solving this question in the following sequential order will be much casier, though
you can solve the way you want. It is always much casier to solve a problem when you
break it down into smaller problems; don't care if your code is long.
1) First, read the string from the keyboard into a memory variable. Count the number
of characters while reading the string.
2) Second, convert initial lowercases to uppercases and initial uppercases to
lowercases; be careful here. You can also do this while reading the string.
3) Third, count the final number of uppercases; after converting all lowercases to
uppercases. You can also do this while reading the string.
4) Fourth, print the resulting string in reverse order, by using indirect addressing (or
indexed addressing, if you wish). Also, be careful here since there are two possible
ways: you can cither reverse the initial string first then display the resulting reversed
string, or you can directly display the initial string in reverse order.
5) Display the two counts.
If the user enters more than 128 characters, only the first 128 characters must be processed
(the rest are ignored but make sure that you cannot write outside the memory you have
allocated for storing the string).
Transcribed Image Text:Prouramming Exercise 3 (40 noints): [call it Ass2-Q3.asm] Write an ASM program that prompts the user to enter a string of at most 128 characters and then displays the string in reverse order, with: cach upper-case letter converted to its corresponding lower-case letter, and cach lower-case letter converted to its corresponding upper-case letter. The program should also display the number of uppercase letters after displaying the output string, as well as the total number of characters in the string. For instance, a sample execution of "Ass2-Q3.exe" with the input string "An Input Line!" is shown below C:Programminglasm>Ass2-Q3 Enter a string of at most 128 characters: An Input Line! Here it is, with all lowercases and uppercases flipped, and in reverse order: !ENII TUPNI Na There are 8 upper-case letters after conversion. There are 14 characters in the string. C:Programminglasm> HINT: Solving this question in the following sequential order will be much casier, though you can solve the way you want. It is always much casier to solve a problem when you break it down into smaller problems; don't care if your code is long. 1) First, read the string from the keyboard into a memory variable. Count the number of characters while reading the string. 2) Second, convert initial lowercases to uppercases and initial uppercases to lowercases; be careful here. You can also do this while reading the string. 3) Third, count the final number of uppercases; after converting all lowercases to uppercases. You can also do this while reading the string. 4) Fourth, print the resulting string in reverse order, by using indirect addressing (or indexed addressing, if you wish). Also, be careful here since there are two possible ways: you can cither reverse the initial string first then display the resulting reversed string, or you can directly display the initial string in reverse order. 5) Display the two counts. If the user enters more than 128 characters, only the first 128 characters must be processed (the rest are ignored but make sure that you cannot write outside the memory you have allocated for storing the string).
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY