X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/81358c71b258a72a2777bba0a0b4a82a7cae298a..77ab69d7bb0902e6ebf0994159ed2205f8413e34:/insn_ld_reg_hl.v diff --git a/insn_ld_reg_hl.v b/insn_ld_reg_hl.v index 3fc7862..e420f2f 100644 --- a/insn_ld_reg_hl.v +++ b/insn_ld_reg_hl.v @@ -1,14 +1,10 @@ `ifdef EXECUTE `INSN_LD_reg_HL: begin case(cycle) - 0: begin - address <= {registers[`REG_H], registers[`REG_L]}; - rd <= 1; - end + 0: `EXEC_READ(`_HL) 1: begin - tmp <= rdata; - `EXEC_INC_PC; - `EXEC_NEWCYCLE; + `EXEC_INC_PC + `EXEC_NEWCYCLE end endcase end @@ -18,17 +14,15 @@ `INSN_LD_reg_HL: begin case (cycle) 0: begin end - 1: begin - case (opcode[5:3]) - `INSN_reg_A: registers[`REG_A] <= tmp; - `INSN_reg_B: registers[`REG_B] <= tmp; - `INSN_reg_C: registers[`REG_C] <= tmp; - `INSN_reg_D: registers[`REG_D] <= tmp; - `INSN_reg_E: registers[`REG_E] <= tmp; - `INSN_reg_H: registers[`REG_H] <= tmp; - `INSN_reg_L: registers[`REG_L] <= tmp; - endcase - end + 1: case (opcode[5:3]) + `INSN_reg_A: `_A <= rdata; + `INSN_reg_B: `_B <= rdata; + `INSN_reg_C: `_C <= rdata; + `INSN_reg_D: `_D <= rdata; + `INSN_reg_E: `_E <= rdata; + `INSN_reg_H: `_H <= rdata; + `INSN_reg_L: `_L <= rdata; + endcase endcase end `endif