mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-09-25 03:24:30 +00:00
Note commonality between Intel-style processors
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -239,8 +239,6 @@ namespace LR35902
|
||||
protected override void HandleINT()
|
||||
{
|
||||
base.HandleINT();
|
||||
this.RaiseHALT();
|
||||
this.DisableInterrupts();
|
||||
this.Restart(this.Bus.Data);
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user