[cc65] assembly subroutine return value

From: Shawn Jefferson <jefferson_shawn_a8bit1yahoo.com>
Date: 2004-07-29 17:48:47
Hi,

From within a C function I am calling an assembly
language subroutine that puts its return value in the
A reg on return.

Is the following correct code to get that put into a
local variable called "ret" ?

asm("jsr $C812");
asm("ldy %o", ret);
asm("sta (sp),y");

Thanks,
Shawn Jefferson



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu, 29 Jul 2004 08:48:47 -0700 (PDT)

This archive was generated by hypermail 2.1.8 : 2004-07-29 17:49:00 CEST