Skip to content

Commit

Permalink
Implement RLA (ROL + AND) (absolute, Y).
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Oct 30, 2020
1 parent 714c9c4 commit a35041c
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 @@ -103,6 +103,11 @@ def illegal_instructions
# NOP (implied)
0x3a => lambda {},

# RLA (ROL + AND) (absolute, Y)
0x3b => lambda {
rla(absolute(@y))
},

# NOP (absolute, X)
0x3c => lambda {
absolute(@x)
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 @@ -110,6 +110,7 @@ def test_absolute_y
# 0x33 <OP> 0xcd
[
[0x1b, 0xbb, 0x9a, true, false, true, false], # SLO
[0x3b, 0x12, 0x9a, false, false, true, false], # RLA
[0xdb, 0x33, 0xcc, false, false, false, false], # DCP
[0xfb, 0x64, 0xce, false, false, false, false] # ISC
].each do |opcode, a, mem, negative, zero, carry, overflow|
Expand Down

0 comments on commit a35041c

Please sign in to comment.