Compound data type: Difference between revisions
m
→{{header|6502 Assembly}}
m (→{{header|ATS}}) |
Puppydrum64 (talk | contribs) |
||
Line 59:
point_x equ point_ram
point_y equ point_ram+MAX_POINT_OBJECTS</lang>
So, for example, let's say we want to load our third (zero-indexed) point variable and copy it to zero page RAM addresses $00 and $01. We would do the following:
<lang 6502asm>MAX_POINT_OBJECTS equ 64
point_ram equ $0400
point_x equ point_ram
point_y equ point_ram+MAX_POINT_OBJECTS</lang>
LDX #3
LDA point_x,x
STA $00
LDA point_y,x
STA $01</lang>
=={{header|Action!}}==
|