Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Variables in 6502 (NES) Assembler

Hi,
I started programming NES Assembler with the tutorials from GBAGuy (http://k2pts.home.comcast.net/gbaguy/index.htm). I wanted to write a program that moves a sprite by changing a variable.
I declared the variable with
X_Pos .db 50
and copied it into the accumulator with
LDA X_Pos
When I use a number instead of a variable, the sprite shows up at the correct position. But when I use the variable, it's somewhere below the upper-left corner, only the last row of the sprite is visible, no matter what number is given to the variable.
To see if it was my fault I assembled GBAGuy's moving sprite example and it's still the same.
I use NESASM and FCE Ultra.
Can somebody help me out?

Greetings,
Dominik

Comments

Sign In or Register to comment.