Note commonality between Intel-style processors

This commit is contained in:
Adrian Conlon
2025-08-10 12:43:34 +01:00
parent 2e1573b016
commit 558da38f12
4 changed files with 13 additions and 13 deletions

View File

@@ -138,6 +138,13 @@ namespace EightBit
this.Jump(0);
}
protected override void HandleINT()
{
base.HandleINT();
this.DisableInterrupts();
this.RaiseHALT();
}
protected sealed override void Push(byte value)
{
this.MemoryWrite(this.SP.Decrement(), value);

View File

@@ -52,7 +52,10 @@ namespace Intel8080
}
else if (this.INT.Lowered())
{
this.HandleINT();
if (this.interruptEnable)
{
this.HandleINT();
}
}
else
{
@@ -69,13 +72,8 @@ namespace Intel8080
protected override void HandleINT()
{
base.HandleINT();
this.RaiseHALT();
if (this.interruptEnable)
{
this.DisableInterrupts();
this.Execute(this.Bus.Data);
this.Tick(3);
}
this.Execute(this.Bus.Data);
this.Tick(3);
}
private int Zero() => ZeroTest(this.F);

View File

@@ -239,8 +239,6 @@ namespace LR35902
protected override void HandleINT()
{
base.HandleINT();
this.RaiseHALT();
this.DisableInterrupts();
this.Restart(this.Bus.Data);
}

View File

@@ -142,7 +142,6 @@ namespace Z80
else if (this._interruptPending)
{
this._interruptPending = false;
this.RaiseHALT();
if (this.IFF1)
{
this.HandleINT();
@@ -611,8 +610,6 @@ namespace Z80
{
base.HandleINT();
this.DisableInterrupts();
var data = this.ReadDataUnderInterrupt();
this.Tick();
Debug.Assert(this.Cycles == 6);