Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an assembly program to compute the following expressions - Create a DWORD array named z of size 3 using DUP operator. Leave the array

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).(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 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+r
z1=z0+(y-r)
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).
image text in transcribed

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

International Baccalaureate Computer Science HL And SL Option A Databases Part I Basic Concepts

Authors: H Sarah Shakibi PhD

1st Edition

1542457084, 978-1542457088

More Books

Students also viewed these Databases questions

Question

a. $3.00 b. $9.50. c. $10.00 d. $8.50

Answered: 1 week ago