A92: Re: "Transfer" of values between C and ASM


[Prev][Next][Index][Thread]

A92: Re: "Transfer" of values between C and ASM




In a message dated 8/4/99 11:29:38 AM Eastern Daylight Time, 
e96nbr@efd.lth.se writes:

> If idle_loop is properly defined you shoule be able to write:
>  
>  int key;
>  key = idle_loop();
>  DrawChar(2,2,key,0);
>  
>  or just
>  
>  DrawChar(2,2,idle_loop(),0);
>  
>  gcc expects data to be returned in d0 (for values) or a0 (for pointers).

whoa!  that's pretty cool.  What would happen if a function returned two 
values...would l do
 index1,index2 = function();
or something else?
Also, what would an example of getting a pointer returned be? (instead of a 
value, like in d0).  Thanks!
--TurboSoft

Visit the TURBOSOFT HOMEPAGE:  The most current Basic programs created by 
Turbosoft for the 89, and the most 89 links.
<A HREF="http://turbosoft.ticalc.org/">http://turbosoft.ticalc.org/</A>


Follow-Ups: