Question: ARM ASSEMBLY LANGUAGE You are given some code in PA2-1.s that creates a string which should correspond to a four letter word. But, this string
ARM ASSEMBLY LANGUAGE You are given some code in PA2-1.s that creates a string which should correspond to a four letter word. But, this string has its characters scrambled. You need to rearrange the characters so when you look at the string in memory it makes a word. The positions of the characters are numbered 0 through 3
The letter originally at position 0 should be moved to position 3
The letter originally at position 1 should be moved to position 0
The letter originally at position 3 should be moved to position 1
The letter at position 2 should not move
You will use a series of LDRB and STRB instructions with pre-indexed addressing to do these. Load each of the three letters to be moved into registers using LDRB instructions to get the letters from different positions. Then store them back to memory into the correct positions using STRB.

PA 2, problem 1 Your required header comments go here 4 Rearrange the characters in the string text in the following way: The letter originally at position e should be moved to position 3 The letter originally at position 1 should be moved to position ? The letter originally at position 3 should be moved to position 1 The letter at position 2 should not move 6 10 11 text 12 13 14 15 16 17 18 19 20 21 DCB Code begins here RO,-text Your code goes here L DR ; address of text now in Re L DRB L DRB LDRB L DRB RI, R2, R3, R4 , [RO, [R0 , [R0 , [R0 , #0] #1 #2] #3 23 24 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
