/*Write an ARM assembly function that takes two unsigned parameters,
and checks for HI (unsigned higher) condition code to check if the first parameter is
higher than the second value. If uint_a value is higher than uint_b value prints its
return value ‘1’ and “uint_a is higher than uint_b”, else prints its return value ‘0’
and “uint_a is lower than uint_b” in C++ code.
Function prototype: lab5_act_2_4(unsigned int, unsigned int) */
#include <stdio.h>
#include <stdlib.h>
extern "C"{
unsigned int lab5_act_2_4(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_4(x,y) == 1)
{
printf("x is higher than y\n");
}
else
{
printf("x is lower than y\n");
}
}