Question: Question 2: Consider the following ARM assembly code segment. Describe what this function does and the contents of RO, R1, R2, and R3 for each

 Question 2: Consider the following ARM assembly code segment. Describe what

Question 2: Consider the following ARM assembly code segment. Describe what this function does and the contents of RO, R1, R2, and R3 for each iteration and when the function terminates. AREA myData, DATA ALIGN str DCB "123",0 AREA MyFunc, CODE EXPORTmain ALIGN ENTRY main PROC LDR rl,-str MOVS r2, #0 LDRBr0, [r1], #1 CBZ r0, stop CMP r0,#0x30 BLT stop CMP r0, #0x39 BGT stop SUBS r0, r0, #0x30 ADD r3, r2, r2, LSL #2 ADD r2, r0, r3, LSL #1 B loop loop stop B stop ENDP Question 2: Consider the following ARM assembly code segment. Describe what this function does and the contents of RO, R1, R2, and R3 for each iteration and when the function terminates. AREA myData, DATA ALIGN str DCB "123",0 AREA MyFunc, CODE EXPORTmain ALIGN ENTRY main PROC LDR rl,-str MOVS r2, #0 LDRBr0, [r1], #1 CBZ r0, stop CMP r0,#0x30 BLT stop CMP r0, #0x39 BGT stop SUBS r0, r0, #0x30 ADD r3, r2, r2, LSL #2 ADD r2, r0, r3, LSL #1 B loop loop stop B stop ENDP

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!