Question: Write an HLA Assembly language program that implements a function which correctly adjusts each parameter value to hold the largest value passed to the function.
Write an HLA Assembly language program that implements a function which correctly adjusts each parameter value to hold the largest value passed to the function. This function should have the following signature:
procedure largest var x : int; var y : int; var z : int; @nodisplay; @noframe;
After invoking the function, the caller's version of the variables x y and z should all set to the same value which is the largest value supplied to the function. Your function must use reference parameters, changing the callers version of the variables passed to the function. Here is a sample program dialogue:
Gimme X:
Gimme Y:
Gimme Z:
After largest, X Y Z
Gimme X:
Gimme Y:
Gimme Z:
After largest, X Y Z
Even though the parameters are listed as int HLA expects you will pass them as memory addresses, requiring a full bit value. So you'll have to use extended registers to hold the parameters, not bit registers!
Since there are reference parameters, the original main program variable values should be changed after being passed to this function
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
