Hello,
i'm playing with cc65 , and there is something i do not manage to do.
I have a C function defined as :
void myfunc(unsigned char p1, unsigned char p2)
And i would like access these parameters from asm( ) inline assembler.
Ideally i would like to do something like :
asm("lda %v",p1);
asm("ldy %v",p2);
The problem is that %v works for global variables, but not for local or parameters which are on the C Stack. I have tested all the "%" variant but no success.
I tried to access also these parameters value directly from the stack with some "pla" assembly instruction , but the pla use the 6502 stack located at $01FF , and the C parameters are store in the C Stack located at $CFFF , so it does not work.
Do you have an idea how i can do that?
Thanks