private void TPseudo()
{
bool run_to_content = false;//是否汇编到程序段指令区
while (cur_token != 0 && !run_to_content)
{
switch (cur_token)
{
case ';':
C();
continue;
case ' ':
case '\t':
skip_space();
continue;
case '\n':
AppendContent();
get_src_token();
continue;
case '\r':
get_src_token();//ignore '\r', as each sentence end with "\n\r" in windows
continue ;
default:
if (cur_token != '.')
{
run_to_content = true;
break;
}
else
{
try
{
get_src_token();
string word = get_word();
format_line.AppendFormat("{0}.{1} ",AppendSpace(),word.ToUpper());
switch (word.ToLower())
{
case "global":
TGlobal();
break;
case "extern":
TExtern();
break;
default:
error("不能识别的伪指令" + word);
break;
}
skip_space();
if (cur_token == '\r' || cur_token == '\n' || cur_token == ';')
break;
else
error(string.Format("当前伪指令结束后出现不支持的符号{0}", cur_token));
}
catch
{
jump_to_next_line();
}
}
break;
}
}
if (cur_token == 0)//文件尾部检查
if (format_line.Length > 0 && src_line.Length > 0)
AppendContent();
}