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

 AREA Mydata, DATA, READWRITE Array1 DCD 1, 4, 7, 8, 11,

AREA Mydata, DATA, READWRITE Array1 DCD 1, 4, 7, 8, 11, 12 Array2 DCD 1, 2, 3, 4, 5, 6 Array 1 is at the location Ox0002 0000 Array 2 is at the location Ox0002 0018 Initial conditions: RO = Ox0000 0000 R1 = OxFFFFFFFF R2 = 0x0000 0001 R4 = 0x0000 0004 R5 = Ox0000 0000 NZVC = 0000 START REPEAT AREA MyPROGRAM, CODE, READ MOVS R1,#0x00 ; instruction 1 MOVT R1,#0x0002 ; instruction 2 LDR R3,=Array2 ; instruction 3 LDR R4, [R1], #4 ; instruction 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 a) What is the machine code for instruction 1 (in hex format)? [2 points] b) What is the NZCV after the instruction 1 is executed? [2 points) c) After the instruction 2 is executed, what is the value in R1(word size hex format)? [2 points] AREA Mydata, DATA, READWRITE Array1 DCD 1, 4, 7, 8, 11, 12 Array2 DCD 1, 2, 3, 4, 5, 6 Array 1 is at the location Ox0002 0000 Array 2 is at the location Ox0002 0018 Initial conditions: RO = Ox0000 0000 R1 = OxFFFFFFFF R2 = 0x0000 0001 R4 = 0x0000 0004 R5 = Ox0000 0000 NZVC = 0000 START REPEAT AREA MyPROGRAM, CODE, READ MOVS R1,#0x00 ; instruction 1 MOVT R1,#0x0002 ; instruction 2 LDR R3,=Array2 ; instruction 3 LDR R4, [R1], #4 ; instruction 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 a) What is the machine code for instruction 1 (in hex format)? [2 points] b) What is the NZCV after the instruction 1 is executed? [2 points) c) After the instruction 2 is executed, what is the value in R1(word size hex format)? [2 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 Databases Questions!