]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - core/insn_ldhl_sp_imm8.v
IP
[fpgaboy.git] / core / insn_ldhl_sp_imm8.v
index 688465ab03bf5be8d122061881119dc7ec428283..3b017a378be3a1adc70cea78031e5ad6c7cfecda 100644 (file)
 `ifdef WRITEBACK
        `INSN_LDHL_SP_IMM8: begin
                case (cycle)
-               2:      `_HL <= `_SP + {rdata[7] ? 8'hFF : 8'h00, rdata};
+               2:      begin
+                               `_HL <= `_SP + {rdata[7] ? 8'hFF : 8'h00, rdata};
+                               `_F <= {
+                                       2'b00,
+                                       (({1'b0,`_SPL[3:0]} + {1'b0,rdata[3:0]}) & 5'h10) ? 1'b1 : 1'b0,
+                                       (({1'b0,`_SPL} + {1'b0,rdata}) & 9'h100) ? 1'b1 : 1'b0,
+                                       `_F[3:0]
+                                       };
+                       end
                endcase
        end
 `endif
This page took 0.026622 seconds and 4 git commands to generate.