Question: Create an HLA Assembly language program that prompts for three integers from the user. Create and call a function that determines if each of the

Create an HLA Assembly language program that prompts for three integers from the user. Create and call a function that determines if each of the passed parameter values is less than 50 and then setsDXto one if the values are all less than fifty; otherwise, setDXto zero. In order to receive full credit, after returning back to the caller, your function shouldnotchange the value of any register other thanDX. Implement the function whose signature is:
procedure allLessThanFifty( value1 : int8; value2 : int8; value3 : int8); @nodisplay; @noframe;
Here are some example program dialogues to guide your efforts:
Provide a value:3
Provide a value:1
Provide a value:102
allLessThanFifty returned false!
Provide a value:8
Provide a value:3
Provide a value:1
allLessThanFifty returned true!
In an effort to help you focus on building an Assembly program, Id like to offer you the followingC statements which match the program specifications stated above. If you like, use them as thebasis for building your Assembly program.
SAMPLE C CODE:
------------------------
bool allLessThanFifty( int a, int b, int c );
int main()
{
int value1, value2, value3;
bool result;
printf( "Provide a value: ");
scanf("%d", &value1);
printf( "Provide a value: ");
scanf("%d", &value2);
printf( "Provide a value: ");
scanf("%d", &value3);
result = allLessThanFifty( value1, value2, value3);
if (result)
printf( "allLessThanFifty returned true!
");
else
printf( "allLessThanFifty returned false!
");
return(0);
}
bool allLessThanFifty( int a, int b, int c )
{
bool result = false;
if (a <50)
{
if (b <50)
{
if (c <50)
{
result = true;
}
}
}
return( result );
}

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!