Question: Objective: Learn memory organization / layout , data transfer concepts and instructions, direct memory access, memory allocation. Requirements: 1 . ( 7 points ) Implement

Objective: Learn memory organization/layout, data transfer concepts and instructions, direct memory access, memory allocation. Requirements: 1.(7 points) Implement the following expression in assembly language: result =(val3+ val4)-(val1 val2)(30*4)/8- Assume that result, val1, val2, val3 and val4 are 16-bit integer variables. - You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it.- Initialize val1 with 134(hexadecimal), val2 with 139(hexadecimal), val3 with 67(hexadecimal) and val4 with 47(hexadecimal)- You are NOT allowed to update the values of any variables. - Use ONLY mov, add, sub, movzx, movsx, or neg instructions whenever needed. - Use the debugger to verify your answer. o Submit the following: Save your source code using your last name, Lastname1.asm and upload the Lastname1.asm Screenshot (showing the code and register window) of EDX register contains the correct result. 2.(10 points) Implement the following expression in assembly language: ECX =(val3- val1)+(-val4+ val2)+3- Assume that val1 is 16-bit variable, val2 is 32-bit variable, val3 is 8-bit variable, and val4 is 8-bit variable. - You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it.- Initialize val1 with 12(decimal), val2 with 9(decimal), val3 with 2(decimal), val4 with 20(decimal),- You are NOT allowed to update the values stored in val1, val2, val3 and val4- Use mov, add, sub, movsx, movzx, or neg instructions whenever needed. - Use the debugger to verify your answer. - o Submit the following: Save your source code using your last name, Lastname2.asm and upload the Lastname2.asm Screenshot (showing the code and register window) of ECX register contains the correct result. 3.(13 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 [0,1,2], where 0 is the first item, 1 is the second item, 2 is the third item - Update each array item using the following expressions. 0=++1=0+()2=+(1+)- 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. o Submit the following: Rename the asm file using your last name as Lastname1.asm Screenshot of the code and memory window showing the content of the variable z (little endian format)Save your source code using your last name, Lastname2.asm and upload the
Lastname2,asm
Screenshot (showing the code and register window) of ECX register contains the correct result.
Objective: Learn memory organization/layout, data transfer concepts and instructions, direct memory access,
memory allocation.
Requirements:
(7 points) Implement the following expression in assembly language:
result =( val 3+ valu )-( vall -val)-30**48
Assume that result, va11, va12, val3 and va14 are 16-bit integer variables.
You need to implement the expression the way it is provided, you cannot do any reduction on the
expression while implementing it.
Initialize val1 with 134(hexadecimal), val2 with 139(hexadecimal), val3 with 67
(hexadecimal) and val 4 with 47(hexadecimal)
You are NOT allowed to update the values of any variables.
Use ONLY mov, add, sub, movzx, movsx, or neg instructions whenever needed.
Use the debugger to verify your answer.
Submit the following:
Save your source code using your last name, Lastname1.asm and upload the
Lastname 1.asm
Screenshot (showing the code and register window) of EDX register contains the correct result.
(10 points) Implement the following expression in assembly language:
ECx=-(val3-vall)+(-val4+val2)+3
Assume that va11 is 16-bit variable, va12 is 32-bit variable, va13 is 8-bit variable, and
val 4 is 8-bit variable.
You need to implement the expression the way it is provided, you cannot do any reduction on the
expression while implementing it.
Initialize val1 with 12(decimal), val 12 with 9(decimal), val3 with 2(decimal), val4 with
20(decimal),
You are NOT allowed to update the values stored in va11, va12, val3 and val4
Use mov, add, sub, movsx, movzx, or neg instructions whenever needed.
Use the debugger to verify your answer.
(13 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
 Objective: Learn memory organization/layout, data transfer concepts and instructions, direct memory

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!