]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - core/insn_ld_reg_reg.v
Move the core to core/
[fpgaboy.git] / core / insn_ld_reg_reg.v
diff --git a/core/insn_ld_reg_reg.v b/core/insn_ld_reg_reg.v
new file mode 100644 (file)
index 0000000..7bbea95
--- /dev/null
@@ -0,0 +1,29 @@
+`ifdef EXECUTE
+       `INSN_LD_reg_reg: begin
+               `EXEC_INC_PC
+               `EXEC_NEWCYCLE
+               case (opcode[2:0])
+               `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_LD_reg_reg: begin
+               case (opcode[5:3])
+               `INSN_reg_A:    `_A <= tmp;
+               `INSN_reg_B:    `_B <= tmp;
+               `INSN_reg_C:    `_C <= tmp;
+               `INSN_reg_D:    `_D <= tmp;
+               `INSN_reg_E:    `_E <= tmp;
+               `INSN_reg_H:    `_H <= tmp;
+               `INSN_reg_L:    `_L <= tmp;
+               endcase
+       end
+`endif
This page took 0.022838 seconds and 4 git commands to generate.