Re: [Flashforth-devel] C stack - passing the params (pic24/33)
Brought to you by:
oh2aun
From: Mikael N. <mik...@pp...> - 2014-07-16 06:52:26
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">Probably, but check the xc16 help section. I think it describes the parameter passing.</p><p style="margin-top:0;margin-bottom:0;">Mike</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>pito<pi...@vo...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Wed, 16/07/2014 02:52</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>flashforth-devel;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>[Flashforth-devel] C stack - passing the params (pic24/33)</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel </pre></div> |