/*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>

void setup() {
  Serial1.begin(9600);
}

extern "C" {
  int lab5_act_1_3(unsigned int a, unsigned int b);
}

int main() {
  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 ret_val = lab5_act_1_3(a, b);

  if (ret_val == 1) printf("uint_a is higher or same as uint_b");
  else printf("uint_a is lower than uint_b");
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT