X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/207251ed32471a6c5fba766d7f73e92a8d86b7cf..25f4912ce5d2a6c70a9f604502303a17359b19ec:/core/insn_add_hl.v diff --git a/core/insn_add_hl.v b/core/insn_add_hl.v index 0d85f95..bfd6880 100644 --- a/core/insn_add_hl.v +++ b/core/insn_add_hl.v @@ -25,7 +25,7 @@ `_F <= { /* Z */ `_F[7], /* N */ 1'b0, /* H */ (({`_HL} + {tmp,tmp2}) & 16'h1000) ? 1'b1 : 1'b0, - /* C */ (({1'b0,`_HL} + {1'b0,tmp,tmp2}) >> 16 == 1) ? 1'b1 : 1'b0, + /* C */ (({1'b0,`_HL} + {1'b0,tmp,tmp2}) & 17'h10000) ? 1'b1 : 1'b0, `_F[3:0] }; `_HL <= {tmp, tmp2};