一种快速构造汇编器的方法及其应用  被引量:3

A Method for Quickly Constructing an Assembler and Its Application

在线阅读下载全文

作  者:陈惠斌[1] 刘春林[1] 胡定磊[1] 

机构地区:[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.

关 键 词:汇编器 构造 VLIW 

分 类 号:TP313[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象