Question: Write an assembly program that does the following two tasks: Reverse an Array . data myIntArray WORD 1 0 h , 2 0 h ,
Write an assembly program that does the following two tasks:
Reverse an Array
data
myIntArray WORD hhhhhhh
Given the above integer array, use a loop with indirect or indexed addressing to reverse its elements in place, namely do not copy the elements to any other array. Use the SIZEOF, TYPE, and LENGTHOF operators to make the program as flexible as possible if the array size and type should be changed in the future. In another word, your program should still work with a minor change if the array is changed to be a BYTE or DWORD array as shown below. The minor change to your code would be at most the register size change to match the data type. Use debugger to check if your solution is correct.
myIntArray BYTEhhhhhhh
or
myIntArray DWORD hhhhhhh
Fibonacci Numbers
Write a program that uses a loop to calculate the first values of the Fibonacci number sequence, described by the following formula: Fib Fib Fibn Fibn Fibn Place these values in a DWORD array declared as follows. The first two elements of this array are initialized to Inside the loop, calculate the following elements of the Fibonacci sequence and store them in this array. Use debugger to check your solution.
data
fibonacciSeq DWORD DUP
in microsoft visual studio
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
