]> Joshua Wise's Git repositories - fpgaboy.git/blob - core/insn_ldbcde_a.v
Fix some carry-related bugs and a typo in insn_alu_a.
[fpgaboy.git] / core / insn_ldbcde_a.v
1 `define INSN_LDBCDE_A           9'b0000xx010
2
3 `ifdef EXECUTE
4         `INSN_LDBCDE_A: begin
5                 case (cycle)
6                 0:      if (opcode[3]) begin
7                                 if (opcode[4]) begin `EXEC_READ(`_DE) end
8                                 else begin `EXEC_READ(`_BC) end
9                         end else begin
10                                 if (opcode[4]) begin `EXEC_WRITE(`_DE, `_A) end
11                                 else begin `EXEC_WRITE(`_BC, `_A) end
12                         end
13                 1:      begin
14                                 `EXEC_INC_PC
15                                 `EXEC_NEWCYCLE
16                         end
17                 endcase
18         end
19 `endif
20
21 `ifdef WRITEBACK
22         `INSN_LDBCDE_A: begin
23                 case (cycle)
24                 0:      begin end
25                 1:      if (opcode[3]) `_A <= rdata;
26                 endcase
27         end
28 `endif
This page took 0.029441 seconds and 4 git commands to generate.