2.3.2 测试程序编译流程
1. 编写MIPS架构的汇编文件
# Comment giving name of program and description of function
# 说明下程序的目的和作用(其实和高级语言都差不多了)
# Template.s
#Bare-bones outline of MIPS assembly language program
.data # variable declarations follow this line
# 数据变量声明
# ...
.text # instructions follow this line
# 代码段部分
main: # indicates start of code (first instruction to execute)
# 主程序
# ...
# End of program, leave a blank line afterwards to make SPIM happy2. 将汇编程序进行编译链接
2.1 GNU工具链的安装
2.2 使用GNU工具进行编译链接
Last updated