Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Find what are incorrect in the following assembly program AREA myData, DATA, READWRITE String DCB ABCDE Array DCD 1, 2, 3, 4, 5 END

image text in transcribed
1. Find what are incorrect in the following assembly program AREA myData, DATA, READWRITE String DCB "ABCDE Array DCD 1, 2, 3, 4, 5 END AREA myCode, CODE, READONLY EXPORT main2 main PROC PROC ENDP ENDP sum END 2. LSL (logic shift left) can be used to speed up the multiplication because LSL runs much faster than MUL. Use LSL to implement the following C statements. a) x 31.x; b) x 38.x; c) x=17*x; 3. Suppose re exeFefefeF, and r1 0xFEDCBA98, find the result of the following operations. a) EOR r3, ri, re b) ORR r3, rl, re c) AND r3, rl, re d) BIC r3, ri, re f) MVN r3, re 4. Suppose re ex56789ABC, find the result of the following operation. a) RBIT r1, re b) REV ri, re C) REV16 ri, re d) REVSH ri, re Translate the following C statement into an assembly program, assuming 16-bit signed integers x, y and z (ie. signed short) are stored in 32-bit register rO, ri, and r2, respectively. 5. 6. Write an assembly program that calculates the value of the following given polynomial, assuming signed integers x and y are stored in register rO and ri, respectively. y- 3x3-7x2 +10x 11 7. Write an assembly program that swaps the upper half-word and the lower half-word of a register

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions