More analysis suggested tidy ups.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-02-06 23:41:56 +00:00
parent d6d8c4e13c
commit 0e8a530573
9 changed files with 26 additions and 42 deletions
+4 -8
View File
@@ -8,16 +8,12 @@ namespace EightBit
public abstract class Processor : ClockedChip
{
private readonly Bus bus;
private byte opcode;
private ushort pc = 0;
private PinLevel resetLine;
private PinLevel intLine;
protected Processor(Bus memory)
{
this.bus = memory;
this.Bus = memory;
}
public event EventHandler<EventArgs> RaisingRESET;
@@ -36,11 +32,11 @@ namespace EightBit
public event EventHandler<EventArgs> LoweredINT;
public ushort PC { get => this.pc; set => this.pc = value; }
public ushort PC { get; set; }
public Bus Bus { get => this.bus; }
public Bus Bus { get; }
protected byte OpCode { get => this.opcode; set => this.opcode = value; }
protected byte OpCode { get; set; }
public ref PinLevel RESET() => ref this.resetLine;