Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I necroposted in an old topic, but I have updates so I'm going to post about it the right way. To quote

Hmm, I'm having a weird bug with v2.0. The following code isn't emulated correctly:

  ld bc,$E240
  ld hl,3
  ld ix,$C480
  add ix,ix
  adc hl,hl
  add ix,bc

Expected result: This should set the carry flag. It does on hardware, but does not in the emulator. I don't know if this is the minimal code to reproduce the bug, but it is sufficient.

Well, I hit this bug again when I was trying to test a division routine and I've got a hunch as to what the problem is.

I stepped through and noticed that add ix,de was erroneously setting the carry flag this time. I had suspected it was an issue with the emulator using signed integers, and so I decided to try something: In the debug menu, I highlighted the contents of IX, erased it, and manually typed in the same exact value. This time, it didn't incorrectly set the carry flag.

On the left side is just stepping through the code, on the right is editing IX before stepping:

Whelp, this caused undue headaches XD

EDIT: Just making sure it isn't using the larger, cached images on Imgur's servers.
Great investigating Xeda - hopefully the fix can be incorporated into the project.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum