X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/e7fe9dc201afb96f401fb2d3cf5aa19aa7e8e796..41341eb3bab6479dc763afbe90c7c31a01d6b60f:/core/insn_ldhl_sp_imm8.v?ds=inline diff --git a/core/insn_ldhl_sp_imm8.v b/core/insn_ldhl_sp_imm8.v new file mode 100644 index 0000000..688465a --- /dev/null +++ b/core/insn_ldhl_sp_imm8.v @@ -0,0 +1,26 @@ +`define INSN_LDHL_SP_IMM8 9'b011111000 + +`ifdef EXECUTE + `INSN_LDHL_SP_IMM8: begin + case (cycle) + 0: begin + `EXEC_INC_PC + end + 1: begin + `EXEC_READ(`_PC) + end + 2: begin + `EXEC_NEWCYCLE + `EXEC_INC_PC + end + endcase + end +`endif + +`ifdef WRITEBACK + `INSN_LDHL_SP_IMM8: begin + case (cycle) + 2: `_HL <= `_SP + {rdata[7] ? 8'hFF : 8'h00, rdata}; + endcase + end +`endif