private string FormatValue(object value)
{
if (value is X86Register)
return value.ToString().ToLowerInvariant();
switch (Type.GetTypeCode(value.GetType()))
{
case TypeCode.Byte:
return FormatByte((byte)value);
case TypeCode.UInt16:
return FormatWord((ushort)value);
case TypeCode.UInt32:
return FormatDword((uint)value);
case TypeCode.UInt64:
return FormatQword((ulong)value);
}
throw new NotSupportedException();
}