I've seen some examples, but it is not clear to me how or if parameters get stored as registers or on the stack always?
Here is my function declaration in the .h file
Code: Select all
/*
* parameters:
* x
* y
* xwidth
* yheight
* Framebuffer address
*
*/
extern void draw_rect(int, int, int, int, volatile unsigned short *);
If these are put on the stack as I've read from the web Mixing Assembly and C.
Is there any way I can debug or print out what I have from my assembly code? I have Gens, but there would be no way to break the execution to see what the stack has when my procedure is called?
Or would something like this work to get arguments from the stack?
Code: Select all
mov.l @-r15,r0 ! store first param in r0
mov.l @-r15,r1 ! store second in r1
mov.l @-r15,r2 ! r2 etc..
....