Write an HLA Assembly language program that implements a function which correctly identifies whether two or more parameters have identical values and returns a boolean value in AL. Return 1 in AL when two or more parameters are identical; 0 otherwise. In order to receive full credit, you should be preventing register corruption by preserving and then restoring the value of any register your function touches. This rule applies to every register except for EAX which is being used to pass an answer back to the calling code. This function should have the following signature:
Write an HLA Assembly language program that implements a function which correctly identifies whether two or more parameters have identical values and returns a boolean value in AL. Return 1 in AL when two or more parameters are identical; 0 otherwise. In order to receive full credit, you should be preventing register corruption by preserving and then restoring the value of any register your function touches. This rule applies to every register except for EAX which is being used to pass an answer back to the calling code. This function should have the following signature:
procedure hasDuplicates( x: int16; y: int16; z: int16 ); @nodisplay; @noframe;
Feed Me x: 5
Feed Me y: 13
Feed Me z: 10
AL = 0
Feed Me x: 35
Feed Me y: 5
Feed Me z: 5
AL = 1
Feed Me x: 5
Feed Me y: 5
Feed Me z: 5
AL = 1
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images