linux arm汇编,linux下arm汇编语法(Linux arm assembler syntax).doc

linux下arm汇编语法(Linux arm assembler syntax)

linux下arm汇编语法(Linux arm assembler syntax)

Linux ARM.Txt assembler syntax opportunities like the bald head hair, you catch caught, catch No. You and I spoke for about 10 minutes, but you did not have any arguments. So, there must be a person become very hypocritical between us! Fault is temporary regret missed forever regret. Encounter is the edge, knowing each other is a contract is love, is love. The first part of the Linux ARM assembler syntax in Linux while using C or C++ programming is very convenient, but the assembly source program system for the most basic initialization, such as initialization stack pointer, set the page table, the operation of ARM co processor. You can jump to the C initialization code is executed after completion. Note that the GNU assembler, follow the AT&T compilation of grammar, available from the GNU site to download the relevant specification ().

A Linux assembly line structure.

Any assembly line is structured as follows:

[]: [} @ comment

[] notes: [} @

Linux ARM assembly, any ends with a colon identifier are considered to be a label, but not necessarily at the beginning of a line.

[1] define a function with "add", the two parameters and returns.

.section.Text, x"

.global add the symbol add external linkage @ give

Add:

ADD R0, R0, R1 @ add input arguments

MOV PC, LR return from @ subroutine

End @ of program

Two. The Linux label in the assembler

Label only by a ~ Z, A ~ Z, 0 ~ 9 "." _ characters etc.. When the label is 0 ~ 9 for local digital label, local label can be repeated, the methods used are as follows:

F: forward in the reference label? Local label

B: back in the reference label? Local label

[2] use cases local symbol example of a cycle

1:

Subs R0, R0, #1 @ r0=r0-1 each time

Bne 1F @ 1 jump to label to execute

The local label represents its address, so it can be used as a variable or function.

Three. Linux segment in the assembler

(1).Section pseudo operation

Users can.Section pseudo operation from the definition of a segment,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值