Skip to content

Commit

Permalink
Implement SRE (LSR + EOR) (absolute, X).
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Oct 31, 2020
1 parent 90b3c02 commit 6fe6049
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 @@ -166,6 +166,11 @@ def illegal_instructions
absolute(@x)
},

# SRE (LSR + EOR) (absolute, X)
0x5f => lambda {
sre(absolute(@x))
},

# NOP (zero page)
0x64 => 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 @@ -86,6 +86,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
[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 6fe6049

Please sign in to comment.