Add a initial port of the MC6809 processor to the .Net collection

Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-04-10 19:51:39 +01:00
parent 8b67a827dd
commit 6b33d2b5a5
9 changed files with 1792 additions and 6 deletions

View File

@@ -5,11 +5,13 @@
namespace EightBit
{
using System.Diagnostics;
using System.Runtime.InteropServices;
[DebuggerDisplay("Word = {Word}")]
public class Register16
{
private byte low;
private byte high;
public Register16(byte low, byte high)
{
this.Low = low;
@@ -32,6 +34,11 @@ namespace EightBit
{
}
public Register16(uint value)
: this((ushort)value)
{
}
public Register16(byte low)
: this(low, 0)
{
@@ -54,9 +61,9 @@ namespace EightBit
}
}
public byte Low { get; set; }
public ref byte Low => ref this.low;
public byte High { get; set; }
public ref byte High => ref this.high;
public static Register16 operator ++(Register16 value) => Increment(value);