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