Jump to content

Compound data type: Difference between revisions

m
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!}}==
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.