mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 21:08:51 +00:00
34 lines
1 KiB
C#
34 lines
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.Compiler.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( Cosmos.Compiler.Assembler.Assembler aAssembler, System.IO.TextWriter aOutput )
|
|
{
|
|
aOutput.Write(mMnemonic);
|
|
aOutput.Write(" ");
|
|
aOutput.Write(SizeToString(Size));
|
|
if (!DestinationEmpty)
|
|
{
|
|
aOutput.Write(" ");
|
|
aOutput.Write(this.GetDestinationAsString());
|
|
}
|
|
}
|
|
}
|
|
}
|