Replies: 1 comment 1 reply
-
What are the semantics for the instruction? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have no idea for the complicated logic...
Semantics:
CMPC reg1, reg2
reg1 - reg2 - carry
carry: goes to 1 if this operation produces a carry out of bit 7 and to 0 otherwise.
zero: remains 1 only if it was 1 before execution and the result is zero. Otherwise goes to 0.
sign: tracks the top bit of the result.
overflow: goes to one if the operation produces overflow and to 0 otherwise.
EDIT: I copied the code from processor 6502 but it didn't work correctly. The decompiler gave a messy output. For assembly as such
The decompiler said
While it is expected that
Beta Was this translation helpful? Give feedback.
All reactions