inline assembly and register state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

inline assembly and register state

565 Views
RoyAtRce
Contributor II

I am not sure if I need to preserve the contents of the CCR and A registers when I write inline assembly marcos.  Is there any documentation out there on this?

 

Thanks,

Roy

Labels (1)
0 Kudos
1 Reply

305 Views
bigmac
Specialist III

Hello Roy,

 

As far as I am aware, there should not be a need to preserve the contents of the registers prior to inline code.  Various registers can be used to pass parameters to a function, but by the time the assembly code block is reached these parameter values should then reside on the stack.  As a general rule, if any values need to be preserved, the compiler should already do this.

 

Regards,

Mac

 

0 Kudos