X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/5509558d05f30339f3393f02f67e8854cbe25a00..5c33c5c001049403ac33d71bfbe0115c318c1b4c:/insn_alu_a.v diff --git a/insn_alu_a.v b/insn_alu_a.v index fe3315a..57a74fc 100644 --- a/insn_alu_a.v +++ b/insn_alu_a.v @@ -1,7 +1,7 @@ `ifdef EXECUTE `INSN_ALU_A: begin - `EXEC_NEWCYCLE; - `EXEC_INC_PC; + `EXEC_NEWCYCLE + `EXEC_INC_PC end `endif @@ -9,30 +9,30 @@ `INSN_ALU_A: begin case(opcode[5:3]) `INSN_alu_RLCA: begin - registers[`REG_A] <= {registers[`REG_A][6:0],registers[`REG_A][7]}; - registers[`REG_F] <= {registers[`REG_F][7:5],registers[`REG_A][7],registers[`REG_F][3:0]}; + `_A <= {`_A[6:0],`_A[7]}; + `_F <= {`_F[7:5],`_A[7],`_F[3:0]}; end `INSN_alu_RRCA: begin - registers[`REG_A] <= {registers[`REG_A][0],registers[`REG_A][7:1]}; - registers[`REG_F] <= {registers[`REG_F][7:5],registers[`REG_A][0],registers[`REG_F][3:0]}; + `_A <= {`_A[0],`_A[7:1]}; + `_F <= {`_F[7:5],`_A[0],`_F[3:0]}; end `INSN_alu_RLA: begin - registers[`REG_A] <= {registers[`REG_A][6:0],registers[`REG_F][4]}; - registers[`REG_F] <= {registers[`REG_F][7:5],registers[`REG_A][7],registers[`REG_F][3:0]}; + `_A <= {`_A[6:0],`_F[4]}; + `_F <= {`_F[7:5],`_A[7],`_F[3:0]}; end `INSN_alu_RRA: begin - registers[`REG_A] <= {registers[`REG_A][4],registers[`REG_A][7:1]}; - registers[`REG_F] <= {registers[`REG_F][7:5],registers[`REG_A][0],registers[`REG_F][3:0]}; + `_A <= {`_A[4],`_A[7:1]}; + `_F <= {`_F[7:5],`_A[0],`_F[3:0]}; end `INSN_alu_CPL: begin - registers[`REG_A] <= ~registers[`REG_A]; - registers[`REG_F] <= {registers[`REG_F][7],1'b1,1'b1,registers[`REG_F][4:0]}; + `_A <= ~`_A; + `_F <= {`_F[7],1'b1,1'b1,`_F[4:0]}; end `INSN_alu_SCF: begin - registers[`REG_F] <= {registers[`REG_F][7:5],1'b1,registers[`REG_F][3:0]}; + `_F <= {`_F[7:5],1'b1,`_F[3:0]}; end `INSN_alu_CCF: begin - registers[`REG_F] <= {registers[`REG_F][7:5],~registers[`REG_F][4],registers[`REG_F][3:0]}; + `_F <= {`_F[7:5],~`_F[4],`_F[3:0]}; end endcase end