Indirekte addresierung

This commit is contained in:
Mike Schwörer 2017-05-11 11:47:53 +02:00
parent 6074bd8217
commit 80775aa181
2 changed files with 14 additions and 2 deletions

View File

@ -791,6 +791,12 @@ namespace PIC_Simulator.PIC
PCCounter = (int) (high | wert) - 1; PCCounter = (int) (high | wert) - 1;
} }
if (index == ADDR_INDF) // indirekte adresierung
{
if (Register[ADDR_FSR] % 0x80 != 0) SetRegister(Register[ADDR_FSR], wert);
return;
}
Register[index] = wert; Register[index] = wert;
} }
@ -806,6 +812,12 @@ namespace PIC_Simulator.PIC
if (index == ADDR_PCLATH + 0x80) index -= 0x80; if (index == ADDR_PCLATH + 0x80) index -= 0x80;
if (index == ADDR_INTCON + 0x80) index -= 0x80; if (index == ADDR_INTCON + 0x80) index -= 0x80;
if (index == ADDR_INDF) // indirekte adresierung
{
if (Register[ADDR_FSR] % 0x80 != 0) return 0;
return GetRegister(Register[ADDR_FSR]);
}
return Register[index]; return Register[index];
} }