X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/f2b745a710572fd5cb2b1cf97d1d05a9b74d4fe1..3db3fc270d517ca76518b47950f5240990e84cc5:/insn_incdec_reg8.v diff --git a/insn_incdec_reg8.v b/insn_incdec_reg8.v index 78f8b5a..61464f6 100644 --- a/insn_incdec_reg8.v +++ b/insn_incdec_reg8.v @@ -25,5 +25,10 @@ `INSN_reg_H: `_H <= tmp + (opcode[0] ? 8'hFF : 8'h01); `INSN_reg_L: `_L <= tmp + (opcode[0] ? 8'hFF : 8'h01); endcase + `_F <= { + (tmp + (opcode[0] ? 8'hFF : 8'h01)) ? 1'b0 : 1'b1, + 1'b0, + (({1'b0,tmp[3:0]} + (opcode[0] ? 5'h1F : 5'h01)) >> 4) ? 1'b1 : 1'b0, + `_F[4:0]}; end `endif