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