Esempio n. 1
0
        private string FormatOpcode(OpCount opc, OpForm form, int opnum)
        {
            StringBuilder sb = new StringBuilder(FormatOpCount(opc));

            sb.Append(':');

            if (form == OpForm.Ext)
            {
                sb.Append(opnum);
            }
            else
            {
                switch (opc)
                {
                case OpCount.Two:
                case OpCount.Ext:
                    sb.Append(opnum);
                    break;

                case OpCount.One:
                    sb.Append(128 + opnum);
                    break;

                case OpCount.Zero:
                    sb.Append(176 + opnum);
                    break;

                case OpCount.Var:
                    sb.Append(224 + opnum);
                    break;
                }
            }

            return(sb.ToString());
        }
Esempio n. 2
0
        internal static string FormatOpcode(OpCount opc, OpForm form, int opnum)
        {
            StringBuilder sb = new StringBuilder(FormatOpCount(opc));
            sb.Append(':');

            if (form == OpForm.Ext)
            {
                sb.Append(opnum);
            }
            else
                switch (opc)
                {
                    case OpCount.Two:
                    case OpCount.Ext:
                        sb.Append(opnum);
                        break;
                    case OpCount.One:
                        sb.Append(128 + opnum);
                        break;
                    case OpCount.Zero:
                        sb.Append(176 + opnum);
                        break;
                    case OpCount.Var:
                        sb.Append(224 + opnum);
                        break;
                }

            return sb.ToString();
        }