diff --git a/src/common/cpu/ZilogZ80.ts b/src/common/cpu/ZilogZ80.ts index 648753ec..f15ce40d 100644 --- a/src/common/cpu/ZilogZ80.ts +++ b/src/common/cpu/ZilogZ80.ts @@ -1125,7 +1125,7 @@ let do_ix_add = function(operand) flags.H = (((ix & 0xfff) + (operand & 0xfff)) & 0x1000) ? 1 : 0; update_xy_flags((result & 0xff00) >>> 8); - ix = result; + ix = result & 0xffff; };