/* 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. */
#include <stdio.h>
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
extern "C" {
int lab5_act_1_3(unsigned int a, unsigned int b);
}
void loop() {
unsigned int a, b;
printf("enter a: ");
scanf("%i", &a);
printf("%i\n", a);
printf("enter b: ");
scanf("%i", &b);
printf("%i\n", b);
int result = lab5_act_1_3(a, b);
if (result == 1) printf("%i is higher or same as %i\n", a, b);
else printf("%i is lower than as %i\n", a, b);
// return 0;
}