/* Write an ARM assembly function that takes two unsigned parameters, and
checks for LO (unsigned lower) condition code to check if the first parameter is
lower than the second value. If uint_a value is lower than uint_b value prints its
return value ‘1’ and “uint_a is lower than uint_b”, else prints its return value ‘0’
and “uint_a is higher or same as uint_b” in C++ code.
Function prototype: lab5_act_2_3(unsigned int, unsigned int)
*/
#include <stdio.h>
#include <stdlib.h>
extern "C"{
unsigned int lab5_act_2_3(int x,int y);
}
void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
unsigned int x,y;
printf("Enter the value of x:");
scanf("%d",&x);
printf("%d",x);
printf("\nEnter the value of y:");
scanf("%d",&y);
printf("%d",y);
printf("\n");
if(lab5_act_2_3(x,y) == 1)
{
printf("x is lower than y\n");
}
else
{
printf("x is higher than or same as y\n");
}
}