We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
i am working with c and assembly interworking. I am trying to pass the array from c to assembly, but i am getting the error. Please help me in finding the error. The code is as follows
#include <stdio.h>
#include<lpc214x.h>
#define size 5
void shift(int m, int arr[]);
main ()
{
int arr[]={1, 2, 3, 4, 5 };
shift(5, arr);
}
__inline void shift(int m, int arr[])
int a[5];
__asm
mov r2, #5
mov r0, arr
loop LDR a, [r0], #4
sub r2,#1
cmp r2, #0
BNE loop
Thanks and Regards
PVJ