Question: consider the following ARM assembly code segment. Describe what this function does and the contents of R0, R1, R2, and R3 for each iteration and
consider the following ARM assembly code segment. Describe what this function does and the contents of R0, R1, R2, and R3 for each iteration and when the function terminates.
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
Get step-by-step solutions from verified subject matter experts
