Skip to content

CPU.cpp a little mistake in comment #45

Description

@sillenge

There are some small mistakes in the comment, also in the video
old: A = A - M - (1 - C) -> A = A + -1 * (M - (1 - C)) -> A = A + (-M + 1 + C)
new: A = A - M - (1 - C) -> A = A + -1 * (M + (1 - C)) -> A = A + (-M - 1 + C)

code is right, because
-M = +value + 1 ( value = fetched & 0x00FF )
A = A + (value + 1) - 1 + C

thank for your sharing, then I can learn this interesting thing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions