PCL und PCLATH

This commit is contained in:
2017-05-11 19:04:50 +02:00
parent f2fa5b9f96
commit 87e5658818
2 changed files with 7 additions and 2 deletions

View File

@@ -806,7 +806,7 @@ namespace PIC_Simulator.PIC
high &= 0x1F; // Only Bit <0,1,2,3,4>
high <<= 8;
PCCounter = (int) (high | wert) - 1;
PCCounter = (int) (high | wert);
}
if (index == ADDR_INDF) // indirekte adresierung
@@ -830,6 +830,11 @@ namespace PIC_Simulator.PIC
if (index == ADDR_PCLATH + 0x80) index -= 0x80;
if (index == ADDR_INTCON + 0x80) index -= 0x80;
if (index == ADDR_PCL) // PC
{
return (byte) (PCCounter & 0xFF);
}
if (index == ADDR_INDF) // indirekte adresierung
{
if (Register[ADDR_FSR] % 0x80 != 0) return 0;