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()); }
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(); }