Jump to content
IGNORED

Altirra: How to use ;##TRACE to trace the accumulator, X and Y registers?


Recommended Posts

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?

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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 by freetz
  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...