X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/f2b745a710572fd5cb2b1cf97d1d05a9b74d4fe1..77ab69d7bb0902e6ebf0994159ed2205f8413e34:/insn_incdec_reg8.v diff --git a/insn_incdec_reg8.v b/insn_incdec_reg8.v index 78f8b5a..58582b6 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)) == 8'h00) ? 1'b1 : 1'b0, + 1'b0, + (({1'b0,tmp[3:0]} + (opcode[0] ? 5'h1F : 5'h01)) >> 4) ? 1'b1 : 1'b0, + `_F[4:0]}; end `endif