/* Write an ARM assembly function that performs 8 times arithmetic shift right operation
on one signed (Negative number) 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 8: : %d \n",result);
}