Write a small program in ARM to Store these values into an a

Write a small program in ARM to: Store these values into an array: 0, 2, 4, 6, 8, 10 (use loop, don\'t manually put value in) Reverse this array by swapping values (I he array will then store 10, 8, 6, 4, 2, 0) Include the high-level programming language version in your answer as well. Java/C++ code goes here:

Solution

A.

MOV R0, #0 ; R0 accumulates total
MOV R1, #1 ; R1 counts from 1 down to 10
again ADD R0, R0, R1
SUBS R1, R1, #10
BNE again
halt B halt   

 Write a small program in ARM to: Store these values into an array: 0, 2, 4, 6, 8, 10 (use loop, don\'t manually put value in) Reverse this array by swapping va

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site