mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-11-27 18:17:38 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user