freetz Posted February 14 Share Posted February 14 Hi everyone, I love Altirra's ;##TRACE function and it works great with labels, but I can't find any info on how to trace the accumulator or the X/Y registers. I'm using ;## TRACE "Accumulator = %d" db(a) but it gives me strange values, the same goes for db(x) or db(y). If I store the register in a labelled memory location and trace that one, that's fine, but I want to do it directly. Does anyone know how? Quote Link to comment Share on other sites More sharing options...
Teapot Posted February 14 Share Posted February 14 ;##TRACE "%d %d %d" @a x y 1 Quote Link to comment Share on other sites More sharing options...
freetz Posted February 14 Author Share Posted February 14 Great, thanks! Is this documented anywhere where I could have looked it up? Quote Link to comment Share on other sites More sharing options...
phaeron Posted February 14 Share Posted February 14 There's a section in the help file in recent versions for it (Debugger > Diagnostics), but it doesn't cover the specific details here since it just defers to the .printf command for how the arguments are interpreted. The debugger help for the ? command (.help ?) covers how debugger expressions work in general. Quote Link to comment Share on other sites More sharing options...
freetz Posted February 15 Author Share Posted February 15 (edited) Thanks a lot! Is there a reason why the registers have to be accessed via @ and other memory locations can be accessed via db() etc.? And where were the values coming from that I got with db(y) for example? BTW, db(Y) would give me an error... EDIT: Ok, after reading .help ? more thoroughly, with db(y), I probably got the contents of the memory location that the value of the Y-register was referring to. And just FYI: .help ? mentions the X, Y, S, PC and P register, but not the A(ccumulator). Maybe it would be helpful to add. And in gerneral, a tutorial or text on how to use debugging with Altirra would be really great. I think I'm just using 5% of what Altirra is capable of, but that alone is already a huge life-saver, so I can only assume how much more power I'd have at my hands if I had a thorough introduction into all the other capabilities :)... Edited February 15 by freetz 1 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.