/*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 logical_shift_right(int x); //2 parameters.
}
void setup() {
Serial1.begin(9600); //initialising the serial port.
}
int main()
{
int x,y, ans;
printf("Enter the value you want to shift: ");
scanf("%d",&x);
printf("%d\n",x); //to make sure it shows up on the serial monitor.
ans= logical_shift_right(x);
printf("\nThe logical right shift answer : %d \n",ans);
}