您的位置 首页 测评

ARM汇编和Gnu汇编的转化

将ARMADS下的汇编码移植到GCCforARM编译器时,有如下规则:1,注释行以@或/*…*/代替;2,GET或INCLUDE=>.INCLUDE如:…

将ARM ADS下的汇编码移植到GCC for ARM编译器时,有如下规矩:
1,注释行以”@”或”/* … */”替代”;”

2, GET或INCLUDE => .INCLUDE
如:get option.a => .include “option.a”

3, EQU => .equ
TCLK2 EQU PB25 => .equ TCLK2, PB25
SETA ==> .equ
SETL ==> .equ
BUSWIDTH SETA 16 => .equ BUSWIDTH, 16

4, EXPORT => .global
IMPORT => .extern
GBLL => .global
GBLA => .global

5, DCD => .long

6, IF :DEF: => .IFDEF
ELSE => .ELSE
ENDIF => .ENDIF
:OR: => |
:SHL: => << 7, END =>.end
NOTE:在被include的头文件中,如”option.a”中,不再需求.end,否则会导致主汇编程序完毕。

8,符号界说加”:”号
Entry => Entry:
AREA Word, CODE, READONLY ==> .text
AREA Block, DATA, READWRITE ==> .data
CODE32 ==> .arm
CODE16 ==> .thumb

9, MACRO ==> .macro
MEND ==> .endm

Reference:
http://blog.21ic.com/user1/3858/archives/2007/43113.html

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/ceping/264217.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部