/* Write an ARM assembly function that takes two parameters,
and performs a CMP operation with NE (Not Equal) condition code.
If the two parameters passed are not equal it returns a value ‘1’ and equal,
returns a ‘0’. Print “The values are not equal” or else “The values are equal”,
based on either 1 or zero received from the assembly program.
Function prototype: lab5_act_2_2(int, int) */
#include <stdio.h>
#include <stdlib.h>
extern "C"{
unsigned int lab5_act_2_2(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_2(x,y) == 1)
{
printf("The values are not equal\n");
}
else
{
printf("The values are equal\n");
}
}