Exemplo n.º 1
0
        public static int GetSizeOf(VxcType type)
        {
            switch (type)
            {
            case VxcType.ssingle:
            case VxcType.usingle:
                return(1);

            case VxcType.sdouble:
            case VxcType.udouble:
                return(2);

            case VxcType.squad:
            case VxcType.uquad:
                return(4);

            default:
                return(0);
            }
        }
Exemplo n.º 2
0
        public static string GetCommand(Command cmd, VxcType type, params string[] arg)
        {
            string postFix = "";

            if (type == VxcType.ssingle || type == VxcType.usingle)
            {
                postFix = "s";
            }
            if (type == VxcType.squad || type == VxcType.uquad)
            {
                postFix = "q";
            }
            if (type == VxcType.sdouble || type == VxcType.udouble)
            {
                postFix = "d";
            }

            string argumentList = " ";

            switch (cmd)
            {
            case Command.load:
            case Command.pop:
                if (arg.Length == 1)
                {
                    argumentList += arg[0];
                }
                else
                {
                    // error?
                    argumentList += "0";
                }
                break;
            }
            return(cmd.ToString() + postFix + argumentList);
        }
 public DataSegmentElement(string identifier, VxcType type)
 {
     mIdentifier = identifier;
     mType       = type;
 }
Exemplo n.º 4
0
 public VariableInitializerExpression(long value, VxcType type, string name)
 {
     mValue = value;
     mType  = type;
     mName  = name;
 }