TROGDOR Posted January 20, 2006 Share Posted January 20, 2006 (edited) Atari Gurus, I'm in the middle of writing a very hairy 2-line kernel, and I've come across an instance where I need to force a zero-page STA to take 4 cycles. I can do this by making the store absolute instead of zero-page, but is there a clean way to do this in DASM without having to specify the opcode bytes? I've got: STA Temp4 The ugly way to force this is: .byte #$8D .byte #Temp4 .byte #$00 Correct? Thanks, Edited January 20, 2006 by TROGDOR Quote Link to comment Share on other sites More sharing options...
Tom Posted January 20, 2006 Share Posted January 20, 2006 sta.w Temp4 Quote Link to comment Share on other sites More sharing options...
TROGDOR Posted January 20, 2006 Author Share Posted January 20, 2006 Thanks Tom. Quote Link to comment Share on other sites More sharing options...
Zach Posted January 20, 2006 Share Posted January 20, 2006 (edited) If you need four cycles, indexed addressing also works when X or Y is constant, plus it's only 2 bytes whereas STA.w is 3. For example if X=#$10, then STA Temp4-16,X would be your code. Edited January 20, 2006 by Zach Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted January 20, 2006 Share Posted January 20, 2006 It all depends on what your assembler lets you do. "sta.w" is a DASM-ism. Other assemblers might use a strategically placed ">" character. But on a 2600, you can take advanage of the incomplete address decoding and force extended addressing mode by using $01xx: "STA Temp4+$100" 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.