bf
This commit is contained in:
parent
4eebfe8255
commit
0136084aa3
@ -139,6 +139,8 @@ namespace PIC_Simulator.PIC
|
|||||||
|
|
||||||
SetRegisterOhneBank(ADDR_EECON1, 0x00);
|
SetRegisterOhneBank(ADDR_EECON1, 0x00);
|
||||||
SetRegisterOhneBank(ADDR_EECON2, 0x00);
|
SetRegisterOhneBank(ADDR_EECON2, 0x00);
|
||||||
|
|
||||||
|
PCCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Laden(string code)
|
public void Laden(string code)
|
||||||
@ -225,7 +227,7 @@ namespace PIC_Simulator.PIC
|
|||||||
if (TaktgeberAktiviert)
|
if (TaktgeberAktiviert)
|
||||||
{
|
{
|
||||||
TaktgeberZahler += frequenz;
|
TaktgeberZahler += frequenz;
|
||||||
if (TaktgeberZahler > TaktgeberFrequenz)
|
if (TaktgeberZahler >= TaktgeberFrequenz)
|
||||||
{
|
{
|
||||||
TaktgeberZahler = 0;
|
TaktgeberZahler = 0;
|
||||||
SetRegisterOhneBank(TaktgeberAdresse, TaktgeberBitnummer, !GetRegisterOhneBank(TaktgeberAdresse, TaktgeberBitnummer));
|
SetRegisterOhneBank(TaktgeberAdresse, TaktgeberBitnummer, !GetRegisterOhneBank(TaktgeberAdresse, TaktgeberBitnummer));
|
||||||
@ -809,7 +811,7 @@ namespace PIC_Simulator.PIC
|
|||||||
|
|
||||||
if (index == ADDR_INDF) // indirekte adresierung
|
if (index == ADDR_INDF) // indirekte adresierung
|
||||||
{
|
{
|
||||||
if (Register[ADDR_FSR] % 0x80 != 0) SetRegister(Register[ADDR_FSR], wert);
|
if (Register[ADDR_FSR] % 0x80 != 0) Register[Register[ADDR_FSR]] = wert;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -831,7 +833,7 @@ namespace PIC_Simulator.PIC
|
|||||||
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;
|
||||||
return GetRegister(Register[ADDR_FSR]);
|
return Register[Register[ADDR_FSR]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return Register[index];
|
return Register[index];
|
||||||
|
@ -86,6 +86,7 @@ namespace PIC_Simulator.PIC
|
|||||||
|
|
||||||
public void Disconnect()
|
public void Disconnect()
|
||||||
{
|
{
|
||||||
|
if (ComPort == null) return;
|
||||||
ComPort.Close();
|
ComPort.Close();
|
||||||
ComPort = null;
|
ComPort = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user