# Documented sizes and base cycle counts for the instructions the 65C02 adds # to the 6502, taken from the opcode list at # http://6502.org/tutorials/65c02opcodes.html # # Checked against src/cpu/tables.h by tests/check_opcode_spec.py. # # ProcessorTests measures what the hardware does. This records what the # documentation says, so a change to the tables that contradicts the published # spec has to be argued for rather than slipped in. The two have disagreed # once already, over the cycle count of $5C. # # The note is that page's footnote letter, marking counts that vary with # decimal mode, a taken branch or a page crossing. The number here is the base. # # opcode bytes cycles note 00 1 7 - 02 2 2 - 03 1 1 - 04 2 5 - 07 2 5 - 0B 1 1 - 0C 3 6 - 0F 3 5 a 12 2 5 - 13 1 1 - 14 2 5 - 17 2 5 - 1A 1 2 - 1B 1 1 - 1C 3 6 - 1E 3 6 a 1F 3 5 a 22 2 2 - 23 1 1 - 27 2 5 - 2B 1 1 - 2F 3 5 a 32 2 5 - 33 1 1 - 34 2 4 - 37 2 5 - 3A 1 2 - 3B 1 1 - 3C 3 4 a 3E 3 6 a 3F 3 5 a 42 2 2 - 43 1 1 - 44 2 3 - 47 2 5 - 4B 1 1 - 4F 3 5 a 52 2 5 - 53 1 1 - 54 2 4 - 57 2 5 - 5A 1 3 - 5B 1 1 - 5C 3 8 j 5E 3 6 a 5F 3 5 a 61 2 6 a 62 2 2 - 63 1 1 - 64 2 3 - 65 2 3 a 67 2 5 - 69 2 2 a 6B 1 1 - 6C 3 6 - 6D 3 4 a 6F 3 5 a 71 2 5 b 72 2 5 a 73 1 1 - 74 2 4 - 75 2 4 a 77 2 5 - 79 3 4 b 7A 1 4 - 7B 1 1 - 7C 3 6 - 7D 3 4 b 7E 3 6 a 7F 3 5 a 80 2 3 a 82 2 2 - 83 1 1 - 87 2 5 - 89 2 2 - 8B 1 1 - 8F 3 5 a 92 2 5 - 93 1 1 - 97 2 5 - 9B 1 1 - 9C 3 4 - 9E 3 5 - 9F 3 5 a A3 1 1 - A7 2 5 - AB 1 1 - AF 3 5 a B2 2 5 - B3 1 1 - B7 2 5 - BB 1 1 - BF 3 5 a C2 2 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