Skip to content

Commit

Permalink
Implement RLA (ROL + AND) (absolute, X).
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Oct 30, 2020
1 parent a35041c commit b8698dd
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 @@ -113,6 +113,11 @@ def illegal_instructions
absolute(@x)
},

# RLA (ROL + AND) (absolute, X)
0x3f => lambda {
rla(absolute(@x))
},

# NOP (zero page)
0x44 => lambda {
zero_page
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 @@ -82,6 +82,7 @@ def test_absolute_x
# 0x33 <OP> 0xcc
[
[0x1f, 0xbb, 0x98, true, false, true, false], # SLO
[0x3f, 0x10, 0x98, false, false, true, false], # RLA
[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 b8698dd

Please sign in to comment.