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 [�!, �", �#], where �! is the first item, �" is the second item, �# is the third item - Update each array item using the following expressions.  �! = � + 130 �" = � + � − �! �# = � + � − 13 - 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)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.2: Array Initialization
Problem 4E: (Electrical eng.) Write a program that stores the following resistance values in an array named...
icon
Related questions
Question

PLEASE DO YOUR OWN CODING NO COPYING

 

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 [�!, �", �#], where �! is the first item, �" is the second item,
�# is the third item
- Update each array item using the following expressions.
 �! = � + 130
�" = � + � − �!
�# = � + � − 13

- 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).
- If you code correctly, �! = 140 in decimal, �" = −115 in decimal, �# = 1 in decimal




§ Screenshot of the code and memory window showing the content of the variable z (little endian
format).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,