+Dave C Posted October 11, 2021 Share Posted October 11, 2021 Forgive me if I didn't RTFM enough on DASM or Stella. I am wondering if there are existing tools for analyzing 6502 assembly and suggesting optimizations. I didn't find anything obvious but I'm kind of guessing *something* exists...? For example - I found a spot in some of my code where I loaded a register but never used its value in any way before reloading. Now maybe I might be using that for timing purposes but in this case it was just me blundering around changing things and losing track of what I was doing. It seems like something DASM - or Stella - would be able to call out though... Similarly - unreachable code /data - locations in ROM that are initialized but never read during the run of a program. There are other situations - like - I have code that takes advantage of knowing for instance that y will happen to have value $ff and instead of doing a ldy #$0 it will do an iny to save a byte of code space. I'd like to set an inline assertion for Stella to break if that ever becomes untrue... that seems more like something that could be done with a little bit of build scripting... Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted October 11, 2021 Share Posted October 11, 2021 (edited) Well it is a lovely manual. Beautiful. But no, it has nothing about code analysis. there is a forum here though on 6502 tips and tricks. Edited October 11, 2021 by Andrew Davie Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted October 11, 2021 Share Posted October 11, 2021 Sometimes I'm a bit of a tool. And I do optimisations, so there's that. Quote Link to comment Share on other sites More sharing options...
+Dave C Posted October 12, 2021 Author Share Posted October 12, 2021 For sure I've been benefitting from the tips and tricks. 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.