Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an assembly program that will read in a person s name and then print it in lastname, firstname [ middle name ] order. The
Write an assembly program that will read in a persons name and then print it in lastname, firstname middle name order. The notation middle name means zero or more middle names.You will need to write a procedure that will read in characters until the enter key is pressed. Store the characters in an array of characters defined in your data segment. As you read the characters you will need to count the number of characters entered by the user, this may also be stored in a data segment variable. The maximum length of a name will be characters.
You will then need to start at the right end of the name and search backwards for a blank. At this point, you can now print out the last name, a comma, and go back to the beginning of the array and print the rest of the name.
Make sure to properly test you program before submitting it You should test single names such as Rihanna, no name hit enter key immediately names with no middle name, and multiple middle names.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started