Assembler

所属分类:自然语言处理
开发工具:C
文件大小:28KB
下载次数:0
上传日期:2015-03-25 07:54:05
上 传 者sh-1993
说明:  汇编程序,这是一种汇编程序的实现,它将MIPS指令集的一个子集翻译成机器代码。
(Assembler,This is an implementation of an assembler that translates a subset of the MIPS instruction set to machine code.)

文件列表:
LICENSE (11325, 2015-03-25)
Makefile (507, 2015-03-25)
assembler.c (11376, 2015-03-25)
assembler.h (275, 2015-03-25)
input (0, 2015-03-25)
input\combined.s (700, 2015-03-25)
input\comments.s (238, 2015-03-25)
input\imm.s (189, 2015-03-25)
input\labels.s (154, 2015-03-25)
input\p1_errors.s (564, 2015-03-25)
input\p2_errors.s (238, 2015-03-25)
input\pseudo.s (128, 2015-03-25)
input\simple.s (95, 2015-03-25)
log (0, 2015-03-25)
log\ref (0, 2015-03-25)
log\ref\p1_errors_ref.txt (256, 2015-03-25)
log\ref\p2_errors_ref.txt (339, 2015-03-25)
out (0, 2015-03-25)
out\ref (0, 2015-03-25)
out\ref\combined_ref.int (361, 2015-03-25)
out\ref\combined_ref.out (301, 2015-03-25)
out\ref\comments_ref.int (361, 2015-03-25)
out\ref\comments_ref.out (301, 2015-03-25)
out\ref\imm_ref.int (361, 2015-03-25)
out\ref\imm_ref.out (301, 2015-03-25)
out\ref\labels_ref.int (361, 2015-03-25)
out\ref\labels_ref.out (301, 2015-03-25)
out\ref\p1_errors_ref.int (204, 2015-03-25)
out\ref\p1_errors_ref.out (132, 2015-03-25)
out\ref\p2_errors_ref.int (86, 2015-03-25)
out\ref\p2_errors_ref.out (36, 2015-03-25)
out\ref\pseduo_ref.int (163, 2015-03-25)
out\ref\pseudo_ref.int (361, 2015-03-25)
out\ref\pseudo_ref.out (301, 2015-03-25)
out\ref\simple_ref.int (361, 2015-03-25)
out\ref\simple_ref.out (301, 2015-03-25)
run-valgrind (66, 2015-03-25)
... ...

# Assembler This is an implementation of a two-pass assembler that translates a subset of the MIPS instruction set to machine code. This assembler uses only the .text segment of MIPS instruction code. At a high level, the functionality of our assembler can be divided as follows: * Pass 1: Reads the input (.s) file. Comments are stripped, pseudoinstructions are expanded, and the address of each label is recorded into the symbol table. Input validation of the labels and pseudoinstructions is performed here. The output is written to an intermediate (.int) file. * Pass 2: Reads the intermediate file and translates each instruction to machine code. Instruction syntax and arguments are validated at this step. The relocation table is generated, and the instructions, symbol table, and relocation table are written to an object (.out) file.

近期下载者

相关文件


收藏者