Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create an HLA Assembly language program that prompts for two integers from the user. Create and call a function that accepts these two values and
Create an HLA Assembly language program that prompts for two integers from the user. Create and call a function that accepts these two values and then determines if these values both have the same ending digit. Sets DX to one if the values both have the same ending digit; otherwise, set DX to zero. In order to receive full credit, after returning back to the caller, your function should not change the value of any register other than DX Implement the function whose signature is:
procedure sameEndingDigit value : int; value : int; @nodisplay; @noframe;
Here are some example program dialogues to guide your efforts:
Provide a value:
Provide a value:
sameEndingDigit returned false!
Provide a value:
Provide a value:
sameEndingDigit returned true!
In an effort to help you focus on building an Assembly program, Id like to offer you the following C statements which match the program specifications stated above. If you like, use them as the basis for building your Assembly program.
SAMPLE C CODE:
bool sameEndingDigit int a int b ;
int main
int value value;
bool result;
printf "Provide a value: ;
scanfd &value;
printf "Provide a value: ;
scanfd &value;
result sameEndingDigit value value;
if result
printf "sameEndingDigit returned true!
;
else
printf "sameEndingDigit returned false!
;
return;
bool sameEndingDigit int a int b
bool result false;
while a
a a ;
while b
b b ;
if a b
result true;
return result ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started