Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions