Intel processors all seem to act slightly differently with regards to HALT

This commit is contained in:
Adrian Conlon
2025-08-17 12:03:51 +01:00
parent c67e376d4f
commit 1779d1dc40
2 changed files with 7 additions and 1 deletions

View File

@@ -70,7 +70,6 @@ namespace EightBit
{
RaisingHALT?.Invoke(this, EventArgs.Empty);
this.HALT.Raise();
this.PC.Increment();
RaisedHALT?.Invoke(this, EventArgs.Empty);
}
}

View File

@@ -13,6 +13,7 @@ namespace LR35902
{
this.bus = bus;
this.RaisedPOWER += this.LR35902_RaisedPOWER;
this.RaisingHALT += this.LR35902_RaisingHALT;
}
private readonly Bus bus;
@@ -230,6 +231,7 @@ namespace LR35902
this.Execute(this.FetchInstruction());
}
}
private void LR35902_RaisedPOWER(object? sender, EventArgs e)
{
this.RaiseWR();
@@ -238,6 +240,11 @@ namespace LR35902
this.EI = false;
}
private void LR35902_RaisingHALT(object? sender, EventArgs e)
{
this.PC.Increment();
}
protected override void HandleRESET()
{
base.HandleRESET();