Cosmos/source/Compiler/Indy.IL2CPU.Assembler/X86/_Infra/InstructionWithDestinationAndSize.cs

31 lines
945 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.X86 {
public abstract class InstructionWithDestinationAndSize : InstructionWithDestination, IInstructionWithSize {
private byte mSize;
public byte Size {
get {
this.DetermineSize(this, mSize);
return mSize;
}
set {
if (value > 0) {
SizeToString(value);
}
mSize = value;
}
}
public override void WriteText(Indy.IL2CPU.Assembler.Assembler aAssembler, System.IO.TextWriter aOutput)
{
aOutput.Write(mMnemonic);
aOutput.Write(" ");
aOutput.Write(SizeToString(Size));
aOutput.Write(" ");
aOutput.Write(this.GetDestinationAsString());
}
}
}