/* Develop an ARM assembly function to check if the difference between two signed
integers is greater than or equal to zero. Return 1 if true; otherwise, return 0.
Validate the function using a C++ program.
Function prototype: check_difference(int a, int b)*/
#include <stdio.h>
#include <stdlib.h>
extern "C"{
unsigned int check_difference(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(check_difference(x,y) == 1)
{
printf("The difference between two signed integers is greater than or equal to zero\n");
}
else
{
printf("The difference between two signed integers is less than zero\n");
}
}