Question: I'm pretty new to ARMv8 and assembly coding in general, so showing/explaining how you get to the answers is super appreciated :) Thanks in advance!

I'm pretty new to ARMv8 and assembly coding in general, so showing/explaining how you get to the answers is super appreciated :) Thanks in advance!

Here's a text version of the question if the picture is blurry:

Consider a program that declares global integer variables x, y, z[10]. These variables are allocated starting at a base address of decimal 1000. All these variables have been initialized to zero. The base address 1000 has been placed in register X9. The program executes the following assembly instructions:

LDUR W1 [X9, #0]

LDUR W2 [X9, #4]

ADDI W1 W1 #5

ADDI W2 W2 #9

STUR W1 [X9, #8]

STUR W2 [X9, #12]

ADD W2 W2 W1

STUR W2 [X9, #16]

  1. What are the memory addresses of variables x, y, z[0], z[1], and z[2]? (15 points)
  2. What are the values of variables x, y, z[0], z[1], and z[2] at the end of the program? (20 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!