Question: What does the following program do? * 1 point Assembly Program AREA factorial, CODE, READONLY EXPORT _main ENTRY main PROC MOVre, #1 MOV ri, #10

 What does the following program do? * 1 point Assembly ProgramAREA factorial, CODE, READONLY EXPORT _main ENTRY main PROC MOVre, #1 MOVri, #10 MOV r2, #1 loop CMP r2, r1 BGT stop MULS

What does the following program do? * 1 point Assembly Program AREA factorial, CODE, READONLY EXPORT _main ENTRY main PROC MOVre, #1 MOV ri, #10 MOV r2, #1 loop CMP r2, r1 BGT stop MULS re, r2, ro ADD r2, r2, #1 loop stop B stop ENDP END Calculate the sum of squares Calculate the factorial Calculate the average Calculate the greatest common divider (GCD) "TST ro, r1" is similar to "AND r2, ro, r1" except TST (Test Bits) does not store 1 point the result to any register. "TEQ ro, r1" is similar to "EOR r2, ro, ri" except that TEQ (Test Equivalent) does not store the result. * True O False 1 point "CMP ro, r1" is similar to "SUBS r2, ro, r1" except CMP (Compare) does not store the result to any register. "CMN ro, r1" is similar to "ADDS r2, ro, r1" except that CMN (Compare Negative) does not store the result. * True False 1 point What should BXX1 and BXX2 be to make the assembly code equivalent to the C code? (MODIFY THE ANSWER KEY NEXT SEMESTER. Currently it makes all answers as correct because my question has mistakes.) * int x; ; Assume x is stored in RO if((x 20) || (x == 10)) 10; CMP RO, #20 BXX1 check BEQ then check CMPRO, 10 BXX2 endif then SUB RO, RO, #10 endir BXX1 = BEQ, BXX2 = BEQ BXX1 = BEQ, BXX2 = BNE OBXX1 = BNE, BXX2 = BEQ BXX1 = BNE, BXX2 = BNE 1 point Although the compare and test instructions, such as CMP, CMN, TST, and TEQ, do not have a suffix "S", these instructions still update the NZCV status flags. TST and TEQ don't update the V status flag. * True O False

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!