View Single Post
Old 11 January 2020, 18:13   #2
Total Chaos forever!

Samurai_Crow's Avatar
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 45
Posts: 1,358
Send a message via Yahoo to Samurai_Crow
Originally Posted by sparhawk View Post
When I call an assembler function, d0/d1 and a0/a1 don't need to be saved?

The first four params are passed in d0/d1 and a0/a1, or does this depend on wether it's a pointer or value?

Is there some compiler hint to tell the compiler which registers a param might be expected in?
D0/D1/A0/A1 are scratch registers so yes. All other registers need to be preserved.

Whether it's a pointer or not matters.

Yes, GCC has register directives for passing parameters in to subroutines and especially inline Assembly.
Samurai_Crow is online now  
Page generated in 0.04305 seconds with 11 queries