Question: i will give a thumbs up! (4 points) Write an assembly program to compute the following expressions - Create a DWORD array named ' z

i will give a thumbs up!
i will give a thumbs up! (4 points) Write an assembly program

(4 points) Write an assembly program to compute the following expressions - Create a DWORD array named ' z ' of size 3 using DUP operator. Leave the array ' z ' uninitialized. You can denote the items in the array as [z0,z1,z2], where z0 is the first item, z1 is the second item, z2 is the third item - Update each array item using the following expressions. z0=x+y+rz1=z0+(yr)z2=z0+(z1+y) - Where x,y,r are 16-bit integer memory variables. x=10,y=15,r=4 - Use mov, movzx, movsx, add, sub instructions only. - (hint: Do not alter the value of x,y and r during the computation. Transfer them to appropriate registers to do computation) - At the end, open memory window to see the variable z stored in memory (little endian format). - Use the debugger to verify your answer. - Submit the following: - Rename the asm file using your last name as Lastnamel.asm - Screenshot of the code and memory window showing the content of the variable z (little endian format). 4. [3 points] Consider the following example: MOV AL, -5 SUB AL, +125 After executing these two lines of instructions, Carry Flag, CF=0 and overflow flag, OF=1. Show appropriate computation and reasoning to explain why CF=0 and OF=1. Submit the following: - Submit your answer in a pdf file. (4 points) Write an assembly program to compute the following expressions - Create a DWORD array named ' z ' of size 3 using DUP operator. Leave the array ' z ' uninitialized. You can denote the items in the array as [z0,z1,z2], where z0 is the first item, z1 is the second item, z2 is the third item - Update each array item using the following expressions. z0=x+y+rz1=z0+(yr)z2=z0+(z1+y) - Where x,y,r are 16-bit integer memory variables. x=10,y=15,r=4 - Use mov, movzx, movsx, add, sub instructions only. - (hint: Do not alter the value of x,y and r during the computation. Transfer them to appropriate registers to do computation) - At the end, open memory window to see the variable z stored in memory (little endian format). - Use the debugger to verify your answer. - Submit the following: - Rename the asm file using your last name as Lastnamel.asm - Screenshot of the code and memory window showing the content of the variable z (little endian format). 4. [3 points] Consider the following example: MOV AL, -5 SUB AL, +125 After executing these two lines of instructions, Carry Flag, CF=0 and overflow flag, OF=1. Show appropriate computation and reasoning to explain why CF=0 and OF=1. Submit the following: - Submit your answer in a pdf file

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!