using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace UniversalEditor.ObjectModels.Executable.Instructions { public class ExecutableInstructionPush : ExecutableInstruction where T : struct, IComparable, IComparable, IConvertible, IEquatable, IFormattable { public override ExecutableInstructionOpcode OpCode { get { return ExecutableInstructionOpcode.PushByte; } } private T mvarValue = default(T); /// /// The value to push onto the stack. /// public T Value { get { return mvarValue; } set { mvarValue = value; } } public override string ToString() { return "PUSH imm" + (System.Runtime.InteropServices.Marshal.SizeOf(mvarValue) * 8).ToString() + " 0x" + mvarValue.ToString("X", null).PadLeft(2, '0'); } } }