mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 05:48:37 +00:00
33 lines
943 B
C#
33 lines
943 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Cosmos.Compiler.Assembler;
|
|
using Cosmos.Compiler.Assembler.X86;
|
|
|
|
namespace Cosmos.Assembler.XSharp {
|
|
public class RegisterAX : Register16 {
|
|
public static readonly RegisterAX Instance = new RegisterAX();
|
|
|
|
public static implicit operator RegisterAX(ElementReference aReference) {
|
|
Instance.Move(aReference);
|
|
return Instance;
|
|
}
|
|
|
|
public static implicit operator RegisterAX(MemoryAction aAction) {
|
|
Instance.Move(aAction);
|
|
return Instance;
|
|
}
|
|
|
|
public static implicit operator RegisterAX(UInt16 aValue) {
|
|
Instance.Move(aValue);
|
|
return Instance;
|
|
}
|
|
|
|
public static implicit operator PortNumber(RegisterAX aAX)
|
|
{
|
|
return new PortNumber(aAX.GetId());
|
|
}
|
|
|
|
}
|
|
}
|