Question: 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
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
Get step-by-step solutions from verified subject matter experts
