Question: AREA Mydata, DATA, READWRITE Array1 DCD 1, 4, 7, 8, 11, 12 Array2 DCD 1, 2, 3, 4, 5, 6 Array1 is at the location


AREA Mydata, DATA, READWRITE Array1 DCD 1, 4, 7, 8, 11, 12 Array2 DCD 1, 2, 3, 4, 5, 6 Array1 is at the location Ox0002 0000 Array 2 is at the location Ox0002 0018 Initial conditions: RO = 0x0000 0000 R1 = OxFFFFFFFF R2 = 0x0000 0001 R4 Ox0000 0004 R5 = 0x0000 0000 NZVC = 0000 = START REPEAT AREA MyPROGRAM, CODE, READ MOVS R1,#Ox00 ; instruction 1 MOVT R1,#0x0002 ; instruction 2 LDR R3,=Array2 ; instruction 3 LDR R4, [R1], #4 ; instruction 4 LDR R6, [R3], #4 ; instruction 5 LSRS R4, R2 ; instruction 6 CMP R4, R6 ; instruction 7 ADDEQ R5,#0x01 ; instruction 8 CMP R5, #02 ; instruction 9 BNE REPEAT ; instruction 10 END ; instruction 11 d) After the instruction 3 is executed, what is the value in R3 (word size hex format)? [2 points) e) After the instruction 4 is executed in the first time, what is the value in R4 (word size hex format)? [2 points] f) After the instruction 4 is executed in the first time, what is the value in R1 (word size hex format)? [2 points] g) After the instruction 5 is executed in the first time, what is the value in R6 (word size hex format)? [2 points) h) After the instruction 5 is executed in the first time, what is the value in R3 (word size hex format)? [2 points] i) After the instruction 6 is executed in the first time, what is the value in R4 (word size hex format)? [2 points] j) After the instruction 7 is executed in the first time, what is the NZCV? [2 points) k) After the instruction 7 is executed in the first time, which instruction will be executed? Instruction 8 or instruction 9? Why? [2 points) 1) What are the values in R1 (word size hex format), R2 (word size hex format), R3 (word size hex format) and NZCV when the program executes the last instruction END (instruction 11)? [8 points] AREA Mydata, DATA, READWRITE Array1 DCD 1, 4, 7, 8, 11, 12 Array2 DCD 1, 2, 3, 4, 5, 6 Array1 is at the location Ox0002 0000 Array 2 is at the location Ox0002 0018 Initial conditions: RO = 0x0000 0000 R1 = OxFFFFFFFF R2 = 0x0000 0001 R4 Ox0000 0004 R5 = 0x0000 0000 NZVC = 0000 = START REPEAT AREA MyPROGRAM, CODE, READ MOVS R1,#Ox00 ; instruction 1 MOVT R1,#0x0002 ; instruction 2 LDR R3,=Array2 ; instruction 3 LDR R4, [R1], #4 ; instruction 4 LDR R6, [R3], #4 ; instruction 5 LSRS R4, R2 ; instruction 6 CMP R4, R6 ; instruction 7 ADDEQ R5,#0x01 ; instruction 8 CMP R5, #02 ; instruction 9 BNE REPEAT ; instruction 10 END ; instruction 11 d) After the instruction 3 is executed, what is the value in R3 (word size hex format)? [2 points) e) After the instruction 4 is executed in the first time, what is the value in R4 (word size hex format)? [2 points] f) After the instruction 4 is executed in the first time, what is the value in R1 (word size hex format)? [2 points] g) After the instruction 5 is executed in the first time, what is the value in R6 (word size hex format)? [2 points) h) After the instruction 5 is executed in the first time, what is the value in R3 (word size hex format)? [2 points] i) After the instruction 6 is executed in the first time, what is the value in R4 (word size hex format)? [2 points] j) After the instruction 7 is executed in the first time, what is the NZCV? [2 points) k) After the instruction 7 is executed in the first time, which instruction will be executed? Instruction 8 or instruction 9? Why? [2 points) 1) What are the values in R1 (word size hex format), R2 (word size hex format), R3 (word size hex format) and NZCV when the program executes the last instruction END (instruction 11)? [8 points]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
