Question: Can you make this answer in the asmlib.inc code please? In the lecture material you will find code that shows how to use indirect addressing
Can you make this answer in the asmlib.inc code please? In the lecture material you will find code that shows how to use indirect addressing to fill and print D arrays. You will probably want to leverage some of this code for this lab.
Create a D array of DWORD types that is rows by columns. Initially, the elements of the array are set to undefined. Write code to fill the array with random values in the range of You are required to use nested counted loops to fill the array. You are NOT allowed to use store string instructions. Once you have the array filled, print it out to the screen in rowcolumn fashion, with each column separated by a TAB space this is value h using indirect addressing.
Once the loop is printed out, write code that will search the array and count the number of times a specific number appears. You must use indirect addressing to count the number of times a value appears and, fill the array, and print the array.
You are not to use any IF ELSE, WHILE, or ENDW or REPEAT instructions. You are to use pure oldfashioned assembly language to solve this.
You are also required to comment every line of code you write. Failure to do so will drop your grade by
Your program should function like the following:
Note that since these numbers have been generated randomly, your output will probably not match the image above, but it should be the same as far as functionality goes.
About The Range
With most programming languages the range of random numbers can be computed with the following:
range max min
You will not have to worry about this so much because of the functionality built into asmLib. Our total range will be numbers. So move into the eax and call randRange. From that point it is just a matter of scaling up by add to the number created by the random number generator
NOT Allowed
The use of legacy directives like DB and DW is not allowed in this class. A deduction of will be given if you use them.
The use of indirect addressing around variables is NOT allowed in the class unless you are using indirect addressing. An example of this would be val Doing this will result in a reduction in your grade.
Please NOTE:
Not putting comments in assembly language source code is unacceptable. You are required to comment each line of code you write. Failure to do so will result in a reduction in your grade.
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
