Analyzes a string of small (non-capital) letters in memory and puts them in alph
ID: 3632899 • Letter: A
Question
Analyzes a string of small (non-capital) letters in memory and puts them in alphabetical order. (The sequence could be of most any length up to a line, but for consistency, make the string 12-15 random small letters. The sequence should be labeled “string 1” in the data statements, followed by a “.space” directive to reserve at least 20-30 characters (this is extra room in case you input a few extra characters, so that you will still have a null-terminated string, since “.space” clears all byte spaces to 0).Inputs the string from the keyboard using a syscall 8. They should be placed in the reserved
space labeled “string 1.”
Alphabetizes the string using a loop and outputs the alphabetized string to the simulated console.
Assures all characters in the set are really small letters – not capitals, punctuation, numbers, etc.
If a character is incorrect, it should be deleted from the alphabetized list.
The output of ordered letters is preceded by a statement: “The alphabetized string is: ”
Explanation / Answer
If you can't write a simple ASM program, you won't ever be able to write one that's actually complex. Besides, not even a beginner would forget to mention CPU and OS.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.