Question
For the following ARM assembly program, answer the questions .text main: ldr r6, =x ldr r0, [r6] mov r5, #0 L1: cmp r0, r5 bge
For the following ARM assembly program, answer the questions .text main: ldr r6, =x ldr r0, [r6] mov r5, #0 L1: cmp r0, r5 bge L2 add r5, r5, #1 sub r0, r0, #1 b L1 L2: mov r0, r5 mov pc, lr .data x: .word 20
a. Show the address (in hex) next to each instruction according to the ARM conventions for memory allocation. Assume that the code starts at 0x00000000 and data memory starts at 0x10000000 b. Draw the symbol table listing the labels and their address c. Does "b L1" require relocation when linked with another object file? d. What is the value of R6 after the first instructions in main executes?
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