[cc65] C to ASM passing variables

From: Carlos <shangri-la1teleline.es>
Date: 2010-05-24 16:52:21
Hi,

Just a small question about sharing variables between C and ASM.

How can i pass a variable from a C module to an ASM module? For instance, from my main C program to an ASM raster interrupt handler routine.

I know how to do it from ASM to C:

asm module

_testvalue:
.byte $7

C module

extern unsigned char testvalue;

but don't know how to do it from C to ASM. Moreover, it is explained this stuff and any related (pass variables to ASM via functions parameters and use them) somewhere in the documentation?


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon May 24 16:52:10 2010

This archive was generated by hypermail 2.1.8 : 2010-05-24 16:52:12 CEST