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