using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.Assembler.X86
{
///
///
///
public class InstructionData : Cosmos.Assembler.X86.IInstructionData
{
///
/// Gets or sets the size.
///
/// The size.
public BitSize Size { get; set; }
///
/// Gets or sets the target instruction set.
///
/// The target instruction set.
public InstructionSet InstructionSet { get; set; }
public Operand Op1 { get; set; }
public Operand Op2 { get; set; }
public Operand Op3 { get; set; }
public Operand Op4 { get; set; }
public string ToString( InstructionOutputFormat aFormat )
{
string Instruction = "";
string tmp;
switch( aFormat )
{
case InstructionOutputFormat.ASM:
tmp = Size.ToString();
if( tmp == "" )
return Instruction;
Instruction += tmp + " ";
//tmp = this.GetDestinationAsString();
if( tmp == "" )
return Instruction;
Instruction += tmp + " ";
//tmp = this.GetSourceAsString();
if( tmp == "" )
return Instruction;
Instruction += ", " + tmp;
return Instruction;
}
return "Format not supported.";
}
}
}