Question: HW 1 Problem 0 ( 2 5 points ) Write an assembly program that calculates the value of the following given polynomial, assuming signed integers

HW 1
Problem 0(25 points)
Write an assembly program that calculates the value of the following given polynomial, assuming signed
integers x is stored in register r0.(Note: y can be 64-bit)
y=x2+2x-8
Problem 1(25 points)
Write an assembly program to swap a register's upper and lower half words.
Problem 2(25 points)
Suppose r0=0FFFFFFFF,rl=000000001, and r2=000000000. Initially, the N,Z,C, and V flags are
zero. Find the value of the N,Z,C, and V flags of the following instructions.
ADDr3,r0,r2
SUBS r3,r0,r0
ADDSr3,rO,r2
LSL r3,r0, #1
LSRS r3,rl,=1
ANDS r3,rO,r2
TEQ r2,#0
CMNrOrr2
Problem 3(25 points)
USAT r2,#8,r0
SBFX r2,r1,#3,#12
SSAT r2,#8,r0
MLS r2,r0,r1,rO
 HW 1 Problem 0(25 points) Write an assembly program that calculates

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!