mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-21 21:38:52 +00:00
31 lines
916 B
C#
31 lines
916 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using X86 = Cosmos.Compiler.Assembler.X86;
|
|
|
|
namespace Cosmos.Compiler.Assembler.X86.X {
|
|
public class RegisterAL : Register08 {
|
|
public static readonly RegisterAL Instance = new RegisterAL();
|
|
|
|
public static implicit operator RegisterAL(byte aValue) {
|
|
Instance.Move(aValue);
|
|
return Instance;
|
|
}
|
|
|
|
public static implicit operator RegisterAL(MemoryAction aAction) {
|
|
Instance.Move(aAction);
|
|
return Instance;
|
|
}
|
|
|
|
public static implicit operator RegisterAL(PortNumber aPort) {
|
|
new In { DestinationReg = Registers.AL };
|
|
return Instance;
|
|
}
|
|
|
|
public static implicit operator PortNumber(RegisterAL aAL) {
|
|
return new PortNumber(aAL.GetId());
|
|
}
|
|
|
|
}
|
|
}
|