diff --git a/EightBit/IntelProcessor.cs b/EightBit/IntelProcessor.cs index b1c14ea..5d5cb29 100644 --- a/EightBit/IntelProcessor.cs +++ b/EightBit/IntelProcessor.cs @@ -116,10 +116,7 @@ namespace EightBit return HalfCarryTableSub[index & (int)Mask.Three]; } - protected void ResetRegisterSet() - { - this.AF.Joined = this.BC.Joined = this.DE.Joined = this.HL.Joined = (ushort)Mask.Sixteen; - } + protected void ResetRegisterSet() => this.AF.Joined = this.BC.Joined = this.DE.Joined = this.HL.Joined = (ushort)Mask.Sixteen; private void IntelProcessor_RaisedPOWER(object? sender, EventArgs e) { @@ -244,10 +241,7 @@ namespace EightBit this.Jump(); } - protected void Jump() - { - this.Jump(this.MEMPTR); - } + protected void Jump() => this.Jump(this.MEMPTR); protected void CallIndirect() { @@ -255,10 +249,7 @@ namespace EightBit this.Call(); } - protected void Call() - { - this.Call(this.MEMPTR); - } + protected void Call() => this.Call(this.MEMPTR); protected virtual void JumpRelative(sbyte offset) { diff --git a/Z80/Z80.cs b/Z80/Z80.cs index 7b56350..4187aac 100644 --- a/Z80/Z80.cs +++ b/Z80/Z80.cs @@ -193,20 +193,11 @@ namespace Z80 this.ResetRegisterSet(); } - private void Z80_LoweredINT(object? sender, EventArgs e) - { - this._interruptPending = true; - } + private void Z80_LoweredINT(object? sender, EventArgs e) => this._interruptPending = true; - private void Z80_LoweredNMI(object? sender, EventArgs e) - { - this._nonMaskableInterruptPending = true; - } + private void Z80_LoweredNMI(object? sender, EventArgs e) => this._nonMaskableInterruptPending = true; - private void Z80_LoweredRESET(object? sender, EventArgs e) - { - this._resetPending = true; - } + private void Z80_LoweredRESET(object? sender, EventArgs e) => this._resetPending = true; #region Z80 specific pins @@ -492,10 +483,7 @@ namespace Z80 this.OnWrittenMemory(); } - protected override void MemoryWrite() - { - this.MemoryUpdate(); - } + protected override void MemoryWrite() => this.MemoryUpdate(); private void RefreshMemory() { @@ -737,15 +725,9 @@ namespace Z80 private static byte SET(int n, byte operand) => SetBit(operand, Bit(n)); - protected override void DisableInterrupts() - { - this.IFF1 = this.IFF2 = false; - } + protected override void DisableInterrupts() => this.IFF1 = this.IFF2 = false; - protected override void EnableInterrupts() - { - this.IFF1 = this.IFF2 = true; - } + protected override void EnableInterrupts() => this.IFF1 = this.IFF2 = true; private Register16 HL2() => this._prefixDD ? this.IX : this._prefixFD ? this.IY : this.HL; @@ -1604,10 +1586,7 @@ namespace Z80 this.PushShort(this.RP2(p)); } - private void PopRegisterPair(int p) - { - this.PopInto(this.RP2(p)); - } + private void PopRegisterPair(int p) => this.PopInto(this.RP2(p)); private void PrefixCB() {