臂组装编程 [英] Arm assembly programming

查看:152
本文介绍了臂组装编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在arm汇编代码中,我看到下面的行使用了=。究竟这个操作符是什么用于手臂。



ldr r0,=常数



我们可以使用的常数,如任何地址或变量持有地址或价值?



我会用它像



ldr r0,= 0x5(5是一个值)







ldr r0,= 0x400000(其中0x400000是地址)







ldr r0,= ADDR_PTR(其中ADDR_PTR是一个占地址的变量)



以上所有事情都是正确的,或者我在这里理解错误。

解决方案

假设你的问题没有副本参考手册,您可以通过以下方式轻松找到答案: https://www.google.com/search?q = arm + assembly [ ^ ]

In arm assembly code, I am seeing the below line where "=" is used. what exactly this operator is used in arm.

ldr r0, =CONSTANT

what constant we can use, like any address or a variable which holds the address or a value?

shall i use it like

ldr r0, =0x5 (5 is a value)

or

ldr r0, =0x400000 (where 0x400000 is an address)

or

ldr r0, =ADDR_PTR (where ADDR_PTR is a variable hoding a address)

Is all the above things correct or i am understanding something wrong here.

解决方案

Assuming from your question you do not have a copy of a reference manual, you can find the answers quite easily by following: https://www.google.com/search?q=arm+assembly[^].


这篇关于臂组装编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆