/* Write an ARM assembly function that takes two parameters,
and performs a CMP operation with EQ (Equal / equal zero) condition code.
If the parameters are equal, return a value of ‘1’ else ‘0’.
Print “The values are equal” else “The values are not equal”, based on either 1 or zero
received from the assembly program.
Function prototype: lab5_act_1_2(int, int)*/
#include <stdio.h>
#include <stdlib.h>
extern "C"{
unsigned int lab5_act_1_2(int x,int y);
unsigned int flag(void);
}
void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
int x,y;
printf("Enter the value for x:");
scanf("%d",&x);
printf("%d",x);
printf("\nEnter the value for y:");
scanf("%d",&y);
printf("%d",y);
printf("\n");
if(lab5_act_1_2(x,y) == 1)
{
printf("The Values are equal\n");
}
else
{
printf("The Values are not equal\n");
}
}