X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/f327eee1f228769c4753a3f2279063c99f6f1ab0..efc8cc5dd78c9126c9e3ced9be2c99c6b962703a:/core/insn_alu_a.v diff --git a/core/insn_alu_a.v b/core/insn_alu_a.v index 80d317d..5806438 100644 --- a/core/insn_alu_a.v +++ b/core/insn_alu_a.v @@ -38,7 +38,7 @@ `INSN_alu_DAA: begin if (`_F[6]) begin if (`_F[4]) begin - if(`_A[3:0] >= 4'h6 && `_A[7:4] >= 4'h6 && `F[5]) begin + if(`_A[3:0] >= 4'h6 && `_A[7:4] >= 4'h6 && `_F[5]) begin `_A <= `_A + 8'h9A; `_F <= {((`_A + 8'h9A) == 8'b0), `_F[6:0]}; end @@ -63,7 +63,7 @@ `_A <= `_A + 8'h66; `_F <= {((`_A + 8'h66) == 8'b0), `_F[6:0]}; end - else if (`_A[3:0] > 4'b9) begin + else if (`_A[3:0] > 4'h9) begin `_A <= `_A + 8'h66; `_F <= {((`_A + 8'h66) == 8'b0), `_F[6:0]}; end @@ -96,8 +96,8 @@ end else begin if (`_A[7:4] > 4'h9) begin - `_A <= `_A + 8'h66; - `_F <= {((`_A + 8'h66) == 8'b0), `_F[6:5], 1'b1, `_F[3:0]}; + `_A <= `_A + 8'h60; + `_F <= {((`_A + 8'h60) == 8'b0), `_F[6:5], 1'b1, `_F[3:0]}; end else begin `_F <= {(`_A == 8'b0), `_F[6:0]};