-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Explain the DAA instruction algorithm #1564
Conversation
I propose adding that A and the value added to/substracted from it must have been BCD for doing the previous instruction.
Explicitly naming additions and substractions also excludes CP, which is listed as an arithmethic instruction by the same document. |
There is no such requirement to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this write-up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Co-authored-by: Eldred Habert <[email protected]>
Fixes #1562
Refer to bloglien and SameBoy for
DAA
explanations. (I followed SameBoy's algorithm here; it's more verbose but also more obvious in the add/subtract distinction.)