Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed undocumented BIT instructions #21

Merged
merged 1 commit into from
Aug 21, 2021
Merged

Fixed undocumented BIT instructions #21

merged 1 commit into from
Aug 21, 2021

Conversation

simonowen
Copy link
Collaborator

They should be BIT b,(ix+d) but were being treated as BIT b,r.

They should be BIT b,(ix+d) but were being treated as BIT b,r.
@kosarev
Copy link
Owner

kosarev commented Aug 21, 2021

Oh, I completely forgot about these. Thanks a lot for catching this! I will need to look into it deeper, as it seems it's not just BIT but the whole bunch of undocumented DD/FD CB instructions, some of which have their own special semantics, e.g, SET 0,(IX+10h),B (DDCB10C0), meaning we would need to figure out how to extend the API and disassembler to represent all that.

@simonowen
Copy link
Collaborator Author

I think the other instructions might already be covered, from what I remember. The BIT instructions are an exception since they don't modify anything and there's no result to write back, so there's no ,r behaviour.

@kosarev
Copy link
Owner

kosarev commented Aug 21, 2021

Right, the undocumented instructions are semantically undistinguishable from their official versions, but the convention for this implementation is that we disassemble all instructions in a way that makes clear their specific encodings -- that's including all and any undocumented instructions.

I will revisit other bits related to all the DD/FD CB instructions and am adding tests for all existing encodings along with resolving some long-standing problems. For now, let's just submit this change and then update things as necessary.

Thanks once again for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants