1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-26 13:49:24 +00:00

Port similar changes from DE* to IN*

This commit is contained in:
Peter Evans 2018-04-30 22:15:24 -05:00
parent 49687d9a7a
commit 1ac19aaaae

View File

@ -190,14 +190,15 @@ DEFINE_INST(dey)
*/
DEFINE_INST(inc)
{
oper++;
MOS_CHECK_NZ(oper);
if (cpu->addr_mode == ACC) {
MOS_CHECK_NZ(cpu->A + 1);
cpu->A++;
cpu->A = oper;
return;
}
MOS_CHECK_NZ(oper + 1);
mos6502_set(cpu, cpu->eff_addr, oper + 1);
mos6502_set(cpu, cpu->eff_addr, oper);
}
/*
@ -205,8 +206,9 @@ DEFINE_INST(inc)
*/
DEFINE_INST(inx)
{
MOS_CHECK_NZ(cpu->X + 1);
cpu->X++;
oper++;
MOS_CHECK_NZ(oper);
cpu->X = oper;
}
/*
@ -214,8 +216,9 @@ DEFINE_INST(inx)
*/
DEFINE_INST(iny)
{
MOS_CHECK_NZ(cpu->Y + 1);
cpu->Y++;
oper++;
MOS_CHECK_NZ(oper);
cpu->Y = oper;
}
/*