Question: Can you make this answer in an asm code answer? Please make sure to use asm.lib.inc and the codes that are for it . In
Can you make this answer in an asm code answer? Please make sure to use asm.lib.inc and the codes that are for it In the lecture material you will find code that shows how to use direct addressing to fill and print an array. You will probably want to leverage some of this code for this lab.
Create an array of DWORD types. Define each element of the array as being undefined. Write code to fill the array with values in the range of Once you have the array filled print it out to the screen using direct addressing.
Once the loop is printed out write code that will search the array and find the smallest value within the array. You will want to create a variable to hold the smallest value. Set this variable to undefined initially.
You are not to use any IF ELSE, WHILE, or ENDW instructions. You are to use pure old fashion assembly language to solve this.
You are also required to comment every line of code you write. Failure to do so will drop you grade
Your program should function like the following:
The smallest number in the array is
Press any key to close this window
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.
Also note that you cannot store data like this
mov arrayebx smallest
Variables to indexed arrays is not allowed. You must use a register. Something like this
mov eax, smallest mov arrayebx eax
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 in unacceptable. You are required to comment each line of code you write. Failure to do so will result in a reduction in your grade.
It need to have call WriteString and call ReadInt for the code to work.
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
