Jump to content
IGNORED

Moving around code causes bugs?


Andrew Re

Recommended Posts

If previously working code starts behaving funny because it's moved to a different ROM location, could that have something to do with the 1 cycle penalty for crossing a page? It's hard to tell exactly what's happening but at a glance the wrong byte is written to GRP0 when it should be erased with a zero. Moving the data used by the kernel to after the kernel solves the bug. I just want to ask if anyone has seen a problem like this before getting down to the nitty-gritty of following the debugger.

Link to comment
Share on other sites

That could do it.

 

Inadvertantly coding direct addresses instead of using labels or setting up z-page pointers using part of the address rather than high/low byte of a label can break stuff too.

 

Moving the code but keeping the low byte of the address the same should keep the cycle count the same though.

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...