Question: Write an assembly language program with five procedures using Y86. The program should have an input array, defined at the top of the program, with

Write an assembly language program with five procedures using Y86. The program should have an input array, defined at the top of the program, with an indeterminate number of values (but no more than 25), which appear in unsorted order. The program will need a Main procedure, a Count procedure,to determine the number of values in the input array, a Min procedure, to find the minimum value in the array, a Max procedure, to find the maximum value in the array, and a Reverse procedure, which will write the values in the input array to output in reverse order.

You are required to define the following at the top of your program:

(1) An input array label, Array; put thislabel at address 0x300.

(2) The actual array values(see below forsample input)

(3) A label at the end of the input array, Done, with no data value (that is, the label only)

(4) A label for a second array, RArray; put this label at address 0x400

(5) An output label, Output; put thislabel at address 0x500

(6) A stack label, Stack, at a high enough addressso that the stack will not grow into the output data, the input data, or the code; put thislabel at address 0xf00.

Please make it so I can copy and paste the code. Thank you.

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