+Karl G Posted January 8, 2019 Share Posted January 8, 2019 If I want to create a pointer to data in a table with a variable offset into the data, what is the syntax? Here is what doesn't work: lda #<enemy_bitmaps_1,y sta EnemyPtr lda #>enemy_bitmaps_1,y sta EnemyPtr+1 I have confirmed via the Stella debugger that I am loading the correct offset into Y, but it is not pulling the correct data when I try to use the pointer. What am I doing wrong here? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted January 8, 2019 Share Posted January 8, 2019 LDA - Immediate and Absolute,Y are two distinct address modes, they can't be used at the same time. In a better compiler that would cause a compile time error, or at least a warning, but with dasm the Absolute,Y mode appears to have priority. I suspect what you're after is covered in step 14 - add animation of my tutorial, though I used Absolute,X instead of Absolute,Y (either will work). 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 8, 2019 Author Share Posted January 8, 2019 I suspect what you're after is covered in step 14 - add animation of my tutorial, though I used Absolute,X instead of Absolute,Y (either will work). It was indeed! Thank you muchly. :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.