`define INSN_VOP_INTR 8'b11111100 // 0xFC is grabbed by the fetch if there is an interrupt pending.
`define INSN_DI 8'b11110011
`define INSN_EI 8'b11111011
+`define INSN_INCDEC_HL 8'b0011010x
+`define INSN_INCDEC_reg8 8'b00xxx10x
`define INSN_cc_NZ 2'b00
`define INSN_cc_Z 2'b01
`include "insn_incdec16.v"
`include "insn_vop_intr.v"
`include "insn_di-ei.v"
+`include "insn_incdec_hl.v"
+`include "insn_incdec_reg8.v"
\ No newline at end of file
--- /dev/null
+`ifdef EXECUTE
+ `INSN_INCDEC_reg8: begin
+ `EXEC_INC_PC
+ `EXEC_NEWCYCLE
+ case (opcode[5:3])
+ `INSN_reg_A: tmp <= `_A;
+ `INSN_reg_B: tmp <= `_B;
+ `INSN_reg_C: tmp <= `_C;
+ `INSN_reg_D: tmp <= `_D;
+ `INSN_reg_E: tmp <= `_E;
+ `INSN_reg_H: tmp <= `_H;
+ `INSN_reg_L: tmp <= `_L;
+ endcase
+ end
+`endif
+
+`ifdef WRITEBACK
+ `INSN_INCDEC_reg8: begin
+ case (opcode[5:3])
+ `INSN_reg_A: `_A <= tmp + (opcode[0] ? 8'hFF : 8'h01);
+ `INSN_reg_B: `_B <= tmp + (opcode[0] ? 8'hFF : 8'h01);
+ `INSN_reg_C: `_C <= tmp + (opcode[0] ? 8'hFF : 8'h01);
+ `INSN_reg_D: `_D <= tmp + (opcode[0] ? 8'hFF : 8'h01);
+ `INSN_reg_E: `_E <= tmp + (opcode[0] ? 8'hFF : 8'h01);
+ `INSN_reg_H: `_H <= tmp + (opcode[0] ? 8'hFF : 8'h01);
+ `INSN_reg_L: `_L <= tmp + (opcode[0] ? 8'hFF : 8'h01);
+ endcase
+ end
+`endif