[cc65] newbie asm question

From: Carlos <shangri-la1teleline.es>
Date: 2010-07-05 16:03:20

I'm taking my first steps with ca65 assembler and have a question that suppose will be newbie stuff...

I want, from my asm code, read the value (one byte) pointed by an int variable that i have defined in my c program. For instance:

My C code:

unsigned int address = 0x4000;

so, i want with assembler read the byte located in the memory position: $4000. I have tried several things but always get an error or didn't work as expected (as in the example).

.import _address

ldy #$00
lda (_address),y
sta _test

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 Jul 5 16:03:21 2010

This archive was generated by hypermail 2.1.8 : 2010-07-05 16:03:24 CEST