Exercise 2 (19 pts): ARM programming. compare characters in first position with the one in last position and make your way to You have to write an ARM program and sabmit the sorce of your program separately trom this paper. You should submit the source file under the following format Upper case or lower case does not matter but the separator is important Piot.s). The challenge is that you need to consider only leters (A Z or a z) and that the case is irrelevant (a and A-e considered the same letter) You have to write a program that deternines if a given string is a palindrome or not (e. can be read from left to right the same as trom right to let) Read this carefully: 1- Since you use the pseuso instruction ASCIZ, the assembler will add a al Your program must have the following header. Make sue that the labels match exactly (including uppercase/lowercase). What is seored at the label string does not matter that is only one example but feel free to use anything 2- Read the slides discussed in class about the first instraction of your subeoutie 1. Make sure you store into the stack the registers rt...10 if you use them in your Make sue that whatever you push into the stack, you pop at the end Do not forget to set ro stringi ASCIZ"Madan, I'm Adan 6- You should have only one eut poeist in e (like _palind) That exit point should oaly pop whatever valuos froes the stack and restore the PC to the C82231 1 lde ro, -string palind Ox11 Graoeful halt. 8- Do not try to write your program fross A to Z at once. Go small steps at a time a Suippet to load every letter from the begisning to the end b. Saippet to load every letter fros the end to the beganing e. Saippet to ignoee a Surout lne palind: datarnines it Saippet to compare two letters indepmdescly of case Output : rd: 1 string is a pal indron" 10- You not write str rs, -label This version of inorect. You can write lIdk x label but the store should be oaly str rx. fryl 11-Avoid to load a register from its own content: &ir rx(ax] 12-Finally, your progran should be commested appropriately 1
string is a pal indron" 10- You not write str rs, -label This version of inorect. You can write lIdk x label but the store should be oaly str rx. fryl 11-Avoid to load a register from its own content: &ir rx(ax] 12-Finally, your progran should be commested appropriately 1