X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/f327eee1f228769c4753a3f2279063c99f6f1ab0..4c90390a786b738c0dc0b8d55e7cc2d857f625de:/core/insn_add_hl.v?ds=inline diff --git a/core/insn_add_hl.v b/core/insn_add_hl.v index 6bd7e7a..66a047f 100644 --- a/core/insn_add_hl.v +++ b/core/insn_add_hl.v @@ -23,7 +23,7 @@ 1: begin `_F <= { /* Z */ `_F[7], /* N */ 1'b0, - /* H */ (({`_HL} + {tmp,tmp2}) & 16'h1000) ? 1'b1 : 1'b0, + /* H */ (({1'b0,`_H[3:0],`_L} + {1'b0,tmp[3:0],tmp2}) & 13'h1000) ? 1'b1 : 1'b0, /* C */ (({1'b0,`_HL} + {1'b0,tmp,tmp2}) & 17'h10000) ? 1'b1 : 1'b0, `_F[3:0] };