PCL und PCLATH

This commit is contained in:
Mike Schwörer 2017-05-11 19:04:50 +02:00
parent f2fa5b9f96
commit 87e5658818
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
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 &= 0x1F; // Only Bit <0,1,2,3,4>
high <<= 8; high <<= 8;
PCCounter = (int) (high | wert) - 1; PCCounter = (int) (high | wert);
} }
if (index == ADDR_INDF) // indirekte adresierung if (index == ADDR_INDF) // indirekte adresierung
@ -830,6 +830,11 @@ 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_PCL) // PC
{
return (byte) (PCCounter & 0xFF);
}
if (index == ADDR_INDF) // indirekte adresierung if (index == ADDR_INDF) // indirekte adresierung
{ {
if (Register[ADDR_FSR] % 0x80 != 0) return 0; if (Register[ADDR_FSR] % 0x80 != 0) return 0;

View File

@ -22,7 +22,7 @@
[X] Ext. Taktgeber an RA4 + IO-Pin [X] Ext. Taktgeber an RA4 + IO-Pin
[ ] Testprogramm 7 (Interrupts) [ ] Testprogramm 7 (Interrupts)
[ ] Testprogramm 9 (Sleep-Befehl) [ ] Testprogramm 9 (Sleep-Befehl)
[ ] Tetstprogramm 10 (PCL und PCLATH) [X] Testprogramm 10 (PCL und PCLATH)
[ ] Testprogramm 11 (Watchdog, Vorteiler) [ ] Testprogramm 11 (Watchdog, Vorteiler)
[ ] Testprogramm 12 (EEPROM) [ ] Testprogramm 12 (EEPROM)
[ ] Zusätzliche eignene Features [ ] Zusätzliche eignene Features