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 2D arrays. You will probably want to leverage some of this code for this lab.
Create a 2D array of DWORD types that is 10 rows by 10 columns. Initially, the elements of the array are set to undefined. Write code to fill the array with random values in the range of 255-265. 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 row/column fashion, with each column separated by a TAB space (this is value 09h) 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 old-fashioned 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 20%
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 +1
You will not have to worry about this so much because of the functionality built into asmLib. Our total range will be 11 numbers. So move 11 into the eax and call randRange. From that point it is just a matter of scaling up by 255(add 255 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 40% 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 [val1]. Doing this will result in a 25% 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 20% reduction in your grade.

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!