Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please take screenshots for the contents of the registers R0/R1/R2/R3/R4 and memory locations reserved for variables a, b, c, and x before and after you
Please take screenshots for the contents of the registers R0/R1/R2/R3/R4 and memory locations reserved for variables a, b, c, and x before and after you run this sample program. For this task, please use format 32-Bit Hex C Style to display the memory contents.
120 . thumb .data .word .word .word .word -15 46 0 ; Puts code in ROM .text .word a_data word b_data .word c_data .word X_data 1 2 3 a_data 4b_data 5c_data 6x_data 7 8 9 10 a_ptr 11 b_ptr 12 c_ptr 13x_ptr 14 15 16 17 18 19 asm_main: 20 21 LDR 22 LDR 23 LDR 24 LDR 25 26 ADD 27 28 LDR 29 LDR 30 31 SUB 32 LDR 33 STR .global asm_main .thumbfunc asm_main .asmfunc ; main r4, a_ptr ro, (r4] r4,b_ptr r1,[r4] r3,r,r1 r4,c_ptr r2,[14] r3, r3, r2 r4,x_ptr r3, [14] 34 bx Ir ; return to C 35 36 37 program 38 39 40 .endasmfunc .end 120 . thumb .data .word .word .word .word -15 46 0 ; Puts code in ROM .text .word a_data word b_data .word c_data .word X_data 1 2 3 a_data 4b_data 5c_data 6x_data 7 8 9 10 a_ptr 11 b_ptr 12 c_ptr 13x_ptr 14 15 16 17 18 19 asm_main: 20 21 LDR 22 LDR 23 LDR 24 LDR 25 26 ADD 27 28 LDR 29 LDR 30 31 SUB 32 LDR 33 STR .global asm_main .thumbfunc asm_main .asmfunc ; main r4, a_ptr ro, (r4] r4,b_ptr r1,[r4] r3,r,r1 r4,c_ptr r2,[14] r3, r3, r2 r4,x_ptr r3, [14] 34 bx Ir ; return to C 35 36 37 program 38 39 40 .endasmfunc .endStep 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