/* Write an ARM assembly function that takes two input parameters,
performs an AND logic operation on it, and returns the result to a calling C program.*/
#include <stdio.h>
#include <stdlib.h>
extern "C"{
int and_asm(int x,int y); //2 parameters.
}
void setup() {
Serial1.begin(9600); //initialising the serial port.
}
int main()
{
int x,y,result;
printf("Enter the 1st value: ");
scanf("%d",&x);
printf("%d\n",x); //to make sure it shows up on the serial monitor.
printf("Enter the 2nd value: ");
scanf("%d",&y);
printf("%d\n",y); //to make sure it shows up on the serial monitor.
result = and_asm(x,y);
printf("\nResult : %d \n",result);
}