检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]国防科技大学计算机学院,湖南长沙410073
出 处:《计算机工程与科学》2006年第6期131-134,共4页Computer Engineering & Science
基 金:国家863计划资助项目(2002AA1Z1110)
摘 要:本文给出一种快速构造汇编器的方法。这种方法的特点是借助lex和yacc分别生成汇编器的词法和语法分析器;指令在汇编器中以一种内部表示的形式存在;指令的编码信息存放在数据表格中,编码一条指令时使用一个通用的过程查询这些表格以决定指令的编码格式,然后调用相应的编码函数产生指令的机器代码。通过这种方法构造的汇编器是易修改的。本文最后叙述这一方法在实现一款VLIWDSP汇编器时的应用。In this article we propose a method for quickly constructing an assembler, The method has the following features: it uses lex and yacc to generate the lexer and parser of an assembler respectively; an instruction exists as an internal representation in the assembler; the instructions' encoding information is saved in the data tables, when encoding an instruction a generic procedure is employed to search these tables to decide on its encoding format, and then a corresponding encoding function is called to produce its machine code. An assembler constructed using this method is easily modifiable. Finally we describe the application of this method when implementing a VLIW DSP' assembler.
分 类 号:TP313[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.15