Re: [cc65] ca65 - addressing .STRUCT

From: Ullrich von Bassewitz <>
Date: 2013-03-02 19:49:53
On Sat, Mar 02, 2013 at 01:14:01PM +0100, wrote:
> I have a table stored in a .STRUCT, where I want to access the first byte of
> this table but don't want to reference the first member because the order of
> the members is likely to change.
> Can a .STRUCT base address somehow be used (I get undefined symbol error
> when trying) without referencing members?
A struct is a type and doesn't have an address. You can place a struct
somewhere in memory and access the memory location instead:

    .struct Coordinate
        X   .word
        Y   .word

Pos:    .tag    Coordinate
        lda     Pos
        ldx     Pos+1



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Mar 2 19:50:00 2013

This archive was generated by hypermail 2.1.8 : 2013-03-02 19:50:04 CET