/*Write an ARM assembly function that performs 2 times logical shift right operation
on one parameter and returns the result to a calling C program. */
#include <stdio.h>
#include <stdlib.h>
extern "C"{
int right_shift_asm(int x); //2 parameters.
}
void setup() {
Serial1.begin(9600); //initialising the serial port.
}
int main()
{
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 = right_shift_asm(x);
printf("\nResult of logical shift right by 2: : %d \n",result);
}