/* Write an ARM assembly function that takes two signed parameters, and checks for LE
(signed less than or equal) conditions code to check if the higher first parameter is
less than or equal to the second parameter. If sint_a value is less than or equal to
sint_b value, then return value ‘1’ and print “sint_a is lower than or equal to sint_b”
else return value ‘0’ and print “sint_a is higher than sint_b” in C++ program.
Function prototype: lab5_act_2_8(int, int) */
#include <stdio.h>
#include <stdlib.h>
extern "C"{
unsigned int lab5_act_2_8(int x,int y);
}
void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
signed 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_8(x,y) == 1)
{
printf("x is lower than or equal to y\n");
}
else
{
printf("x is greater than y\n");
}
}