2012年4月12日

关于 ld 命令中 -Ttext 参数 的测试

摘要: 文件sramboot.S#include"regdef.h".text.globl mainmain: .set noreorder .set noat la at, value lw a0, 0(at) lw a1, 4(at) jal my_add add a2, a0, a1 sw a2, 8(at)文件#include"regdef.h".text.globl my_add,valuemy_add: .set noreorder add a0,a0,3 j raadd a1,a1,4.datavalue: .word 10, 20, 0Makef 阅读全文

posted @ 2012-04-12 20:25 阿加 阅读(1819) 评论(0) 推荐(0) 编辑

gas 多文件组织

摘要: gas多文件工程摘自:Programming from Groundup Chapter 6主要目的是了解如何组织多文件工程(形式)文件record-def.s:.equ RECORD_FIRSTNAME, 0.equ RECORD_LASTNAME, 40.equ RECORD_ADDRESS, 80.equ RECORD_AGE, 320.equ RECORD_SIZE, 324文件linux.s:#Common Linux Definitions#System Call Numbers.equ SYS_EXIT, 1.equ SYS_READ, 3.equ SYS_WRITE, 4.e. 阅读全文

posted @ 2012-04-12 18:31 阿加 阅读(375) 评论(0) 推荐(0) 编辑

导航