Skip to content

Commit

Permalink
Make CMP instructions set the C flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhuffman committed Aug 21, 2022
1 parent 82f250f commit d6033e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion verilog/cpu6502.sv
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ module cpu6502
control.c.ir5 = opcode_clc_sec;

control.v.alu = opcode_adc_sbc;
control.c.alu = opcode_adc_sbc;
control.c.alu = opcode_adc_sbc | opcode_cmp;
control.c.rmw = opcode_acc;

control.n.db7 = opcode_update_nz;
Expand Down

0 comments on commit d6033e2

Please sign in to comment.