diff --git a/PIC_Simulator/PIC/PICProgramm.cs b/PIC_Simulator/PIC/PICProgramm.cs index dbb568f..fe1c28c 100644 --- a/PIC_Simulator/PIC/PICProgramm.cs +++ b/PIC_Simulator/PIC/PICProgramm.cs @@ -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; diff --git a/Projektinformationen/Tabelle.txt b/Projektinformationen/Tabelle.txt index d9aa94f..9d2c48a 100644 --- a/Projektinformationen/Tabelle.txt +++ b/Projektinformationen/Tabelle.txt @@ -22,7 +22,7 @@ [X] Ext. Taktgeber an RA4 + IO-Pin [ ] Testprogramm 7 (Interrupts) [ ] Testprogramm 9 (Sleep-Befehl) -[ ] Tetstprogramm 10 (PCL und PCLATH) +[X] Testprogramm 10 (PCL und PCLATH) [ ] Testprogramm 11 (Watchdog, Vorteiler) [ ] Testprogramm 12 (EEPROM) [ ] Zusätzliche eignene Features