This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C and Assembly

I have a assembly function declared in C as

extern void *func(int *);

and it is called from the C program as

pstack=func(stack);

where

int *pstack;
int *stack; //pointer to array

In my assembly function, I understand that the argument is stored in R1-R3. What I need is to have the assembly function add in contents to the array passed into the function which is initially empty. The function will also return the address of the array which is filled.

My doubt is: How do I have access to a location in the array and subsequently add in a value?

I am new to assembly so please pardon my ignorance. Any assistance will be greatly appreciated. Thank you.

Parents Reply Children
No data