Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION 1 (20 marks) Draw a detailed flowchart and write an ARM assembly program to determine whether a string of printable ASCII letters (from a
QUESTION 1 (20 marks) Draw a detailed flowchart and write an ARM assembly program to determine whether a string of printable ASCII letters (from a to z or from A to Z, case insensitive) stored in memory is a palindrome (i.e., the letters in the string are the same from left to right as from right to left, case insensitive) or not. If palindrome, you should store 1 in ro, if not, you store 2 in ro. Your code should be highly optimized. Use as few instructions as possible (as little as 21 assembly instructions only NOT including any assembly directives or data definitions)!!. Ignore all characters that are not letters. You should also treat capital and small letters the same, i.e., case insensitive. For example, madam, deleveled, Noon, He lived as a devil, eh?, and Was it a car or a cat I saw 2?" are palindrome strings. However, madam, I am Adam. is not a palindrome string. A string can have an even or odd number of characters and must end with character 0x00 (i.e., the ASCII code of the null character). Define in your assembly program the string as follow: STRING DCB "He lived as a devil, eh?"; string Eos DCB Ox00 ;end of string Make sure to test your program with many cases, where some of them are palindrome, and some are not. Make sure that your test cases will cover each branch of your flowchart
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