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)
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).
Trending now
This is a popular solution!
Step by step
Solved in 2 steps