Question: PROGRAM 9 : endsInSeven Write an HLA Assembly language program that implements a function which correctly identifies if both values end in seven and return

PROGRAM 9: endsInSeven
Write an HLA Assembly language program that implements a function which correctly identifies if both values end in seven and return returns a boolean value in AL (1 when both end in seven; 0 otherwise).(HINT: You can perform this operation by repetitively subtracting ten from the value. If you wind up hitting seven before you hit zero, then the value originally ended in seven)
This function should have the following signature:
procedure endsInSeven( x: int16; y: int16); @nodisplay; @noframe;
You must pass your parameters on the run-time stack and 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 AL which is being used to pass an answer back to the calling code.
Feed Me X:5
Feed Me Y:13
Not ending in seven. AL =0
Feed Me X: 57
Feed Me Y: 27
Both ending in seven. AL =1
Feed Me X:5
Feed Me Y: 27
Not ending in seven. AL =0

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!