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 10h,20h,30h,40h,50h,60h,70h
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 BYTE10h,20h,30h,40h,50h,60h,70h
or
myIntArray DWORD 10h,20h,30h,40h,50h,60h,70h
Fibonacci Numbers
Write a program that uses a loop to calculate the first 10 values of the Fibonacci number sequence, described by the following formula: Fib(1)=1, Fib(2)=1, Fib(n)= Fib(n-1)+ Fib(n -2). Place these 10 values in a DWORD array declared as follows. The first two elements of this array are initialized to 1. Inside the loop, calculate the following 8 elements of the Fibonacci sequence and store them in this array. Use debugger to check your solution.
.data
fibonacciSeq DWORD 1,1,8 DUP (?)
in microsoft visual studio 2022

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 Programming Questions!