Skip to content

Commit

Permalink
Implement RRA (ROR + ADC) (absolute, X).
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Oct 31, 2020
1 parent 5bd792f commit 0eacf06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/mos6502/cpu_illegal_instructions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ def illegal_instructions
absolute(@x)
},

# RRA (ROR + ADC) (absolute, X)
0x7f => lambda {
rra(absolute(@x))
},

# NOP (immediate)
0x80 => lambda {
next_byte
Expand Down
1 change: 1 addition & 0 deletions test/cpu_illegal_acc_ops_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def test_absolute_x
[0x1f, 0xbb, 0x98, true, false, true, false], # SLO
[0x3f, 0x10, 0x98, false, false, true, false], # RLA
[0x5f, 0x55, 0x66, false, false, false, false], # SRE
[0x7f, 0x99, 0x66, true, false, false, true], # RRA
[0xdf, 0x33, 0xcb, false, false, false, false], # DCP
[0xff, 0x65, 0xcd, false, false, false, false] # ISC
].each do |opcode, a, mem, negative, zero, carry, overflow|
Expand Down

0 comments on commit 0eacf06

Please sign in to comment.