When used with full 32-bit addresses (that is, non-zero data in the highest 8 bits), the bset and bclr instructions will frequently either corrupt data at the specified address or generate a runtime exception.

Attached is sample code that demonstrates this behavior as well as a runtime log. Note that, at the end of execution, the value of the byte at $FF2000 is $79. If the simulator were operating correctly, the expected value would be $0C.

I suspect that the simulator is not correctly dropping the high byte of the address, and that this issue also affect the bchg instruction. However, I have not personally tested anything other than bset and bclr.

(Apologies for the large copy/paste. The forum's attachment system will not allow me to upload .X68 or .txt files.)

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum