mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 06:25:17 +00:00
doc: Rename aux member to data
This commit is contained in:
committed by
Oliver Schmidt
parent
c2f3421dee
commit
f16ce22281
@@ -1448,7 +1448,7 @@ Or, to access a struct member of a static variable:
|
|||||||
unsigned char x;
|
unsigned char x;
|
||||||
unsigned char y;
|
unsigned char y;
|
||||||
unsigned char color;
|
unsigned char color;
|
||||||
unsigned char aux[32];
|
unsigned char data[32];
|
||||||
} pixel_t;
|
} pixel_t;
|
||||||
static pixel_t pixel;
|
static pixel_t pixel;
|
||||||
__asm__ ("ldy #%b", offsetof(pixel_t, color));
|
__asm__ ("ldy #%b", offsetof(pixel_t, color));
|
||||||
@@ -1457,7 +1457,7 @@ Or, to access a struct member of a static variable:
|
|||||||
/* or to access an array member */
|
/* or to access an array member */
|
||||||
static unsigned char i;
|
static unsigned char i;
|
||||||
__asm__ ("ldy %v", i);
|
__asm__ ("ldy %v", i);
|
||||||
__asm__ ("lda %v+%b,y", pixel, offsetof(pixel_t, aux));
|
__asm__ ("lda %v+%b,y", pixel, offsetof(pixel_t, data));
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
<p>
|
<p>
|
||||||
The next example shows how to use global variables to exchange data between C
|
The next example shows how to use global variables to exchange data between C
|
||||||
|
Reference in New Issue
Block a user