]> Joshua Wise's Git repositories - fpgaboy.git/blame - insn_ldm8_a.v
Make the boot rom talk a bit more, and wait for you to flip a switch. Make the 'progr...
[fpgaboy.git] / insn_ldm8_a.v
CommitLineData
f9000d73
JW
1// If opcode[4], then ld A, x, else ld x, A
2// If opcode[1], then ld 16m8, else ld 8m8
3
4`ifdef EXECUTE
f6fa1d6e 5 `INSN_LD8M_A: begin
f9000d73
JW
6 case (cycle)
7 0: begin
8 `EXEC_INC_PC
9 `EXEC_READ(`_PC + 16'h0001)
10 end
f6fa1d6e
JW
11 1: if (opcode[4]) // LD A,x
12 `EXEC_READ(({8'hFF, rdata}))
f9000d73 13 else
f6fa1d6e
JW
14 `EXEC_WRITE(({8'hFF, rdata}), `_A)
15 2: begin
f9000d73
JW
16 `EXEC_NEWCYCLE
17 `EXEC_INC_PC
18 end
19 endcase
20 end
21`endif
22
23`ifdef WRITEBACK
f6fa1d6e 24 `INSN_LD8M_A: begin
f9000d73 25 case (cycle)
fe3dc890 26 0: begin end
7d59dad9
JW
27 1: begin end
28 2: if (opcode[4]) `_A <= rdata;
f9000d73
JW
29 endcase
30 end
31`endif
32
This page took 0.033784 seconds and 4 git commands to generate.