1
0
mirror of https://github.com/pevans/erc-c.git synced 2025-01-22 05:30:43 +00:00

Add missing NZ checks in INC and DEC

This commit is contained in:
Peter Evans 2018-02-28 21:34:58 -06:00
parent 49199eac84
commit 8d0cf264d7

View File

@ -148,6 +148,7 @@ DEFINE_INST(dec)
// If we get here, then this is ACC mode, and we should work off // If we get here, then this is ACC mode, and we should work off
// that. // that.
MOS_CHECK_NZ(cpu->A - 1);
cpu->A--; cpu->A--;
} }
@ -180,6 +181,7 @@ DEFINE_INST(inc)
return; return;
} }
MOS_CHECK_NZ(cpu->A + 1);
cpu->A++; cpu->A++;
} }