Question: Write an assembly program to do the followings: a . Convert each of the even number in Array 1 to its immediate next higher odd

Write an assembly program to do the followings: a. Convert each of the even number in Array1 to its immediate next higher odd number and each of the odd number in the array to its immediate lower even number. This conversion will be done in a subroutine named Modifier. The modification will be done using logic so that the modifier works for any data in the given array. Before modifications, all the data in the array needs to be saved in the stack so that in future we can use the original data again. b. Now, populate Array 2 with the saved data in the stack. Multiply each of the data (only the even numbers) by 4. This modification will be done by another subroutine named Incrementor. c. Now populate Array such that element 0 of Array 3 is the summation of element 00f Array1 and element 9 of Array2. Element 10f Array3 is the sum of element 1 of Array1 and element 80f Array2 and so on. d. Finally, send the content of element 0 of Array3 to PORT 0 of the trainer kit.

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!