ARM汇编-ARM中的汇编!

.equ and .word

.word is like unsigned int in C.

.equ is like #define

exp:

#define bob 10
.equ bob,10

unsigned int ted;
ted: 
.word 0

unsigned int alice=5;
alice:
.word 5
 @.text .global 是arm-gcc编译器的关键词
.text @指定了后续编译出来的内容放在代码段 .
global _start @告诉编译器后续跟的是一个全局可见的名字 _start: @_start是一个函数的起始地址,也是编译、链接后程序的起始地址。由于程序是通过加载器来加载的
@,必须要找到 _start名字的函数,因此_start必须定义成全局的
posted @ 2017-08-24 11:12  不明白就去明白  阅读(219)  评论(0)    收藏  举报