View Single Post
Old 11 January 2020, 18:13   #3
This cat is no more
jotd's Avatar
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 4,173
With gcc, the params are passed on stack if you don't specify anything (that's empiric, it worked for a quick test I did).

Bebbo gcc 6 supports SDI_compiler include. You can specify "passing by register" and which register. Return value is always taken from D0 (here the return type is void so it doesn't matter)

#include <SDI_compiler.h>

  void ASM mt_install_cia(REG(a6, void *custom),
			  REG(a0, void *VectorBase), REG(d0, UBYTE PALflag));
I suggest that you preserve ALL registers when calling asm. Compiler may use some.
jotd is offline  
Page generated in 0.04702 seconds with 11 queries