Fix add sp, imm8 *sweatdrop*
[fpgaboy.git] / core / insn_ldh_ac.v
CommitLineData
e7fe9dc2
JW
1`define INSN_LDH_AC 9'b0111x0010 // Either LDH A,(C) or LDH (C),A
2
3ad960bd
JW
3`ifdef EXECUTE
4 `INSN_LDH_AC: begin
5 case (cycle)
5c33c5c0
JW
6 0: if (opcode[4]) // LD A,(C)
7 `EXEC_READ(({8'hFF,`_C}))
8 else
9 `EXEC_WRITE(({8'hFF,`_C}), `_A)
3ad960bd 10 1: begin
5c33c5c0
JW
11 `EXEC_NEWCYCLE
12 `EXEC_INC_PC
3ad960bd
JW
13 end
14 endcase
15 end
16`endif
17
18`ifdef WRITEBACK
19 `INSN_LDH_AC: begin
20 case (cycle)
21 0: begin /* Type F */ end
5c33c5c0 22 1: if (opcode[4]) `_A <= rdata;
3ad960bd
JW
23 endcase
24 end
25`endif
26
This page took 0.02768 seconds and 4 git commands to generate.