汇编基本指令的学习
来源:互联网 发布:杰恩马克眼镜 知乎 编辑:程序博客网 时间:2024/05/23 19:19
1:ldr 伪指令
LDR{cond}{.W} Rt, =expr
Rt : is the register to be loaded.
expr :evaluates to a numeric value.
2:ldr指令 装载load 内存--》寄存器
op{type}{cond} Rt, [Rn {, #offset}] ; immediate offset
Rt :is the register to load or store.
Rn :is the register on which the memory address is based
例子:
LDR r8,[r10] ; loads R8 from the address in R10:把r8的数值放入r10所表示的地址。
.
LDRNE r2,[r5,#960]! ; (conditionally) loads R2 from a word 960 bytes above the address in R5, and increments R5 by 960.
3:str指令 存储 store 寄存器--》内存
STR r2,[r9,#consta-struc] : 把r2的值存储到r9的地址constr-struc以上的地址。
consta-struc is an expression evaluating to a constant in the range 0-4095.
4:stm指令 ldm
stmdb :相当于stmfd 先pc减rn再放入sp中
stmia : 先把rn放入sp中,pc然后再加
ldmdb :
ldmia :ldmfd
DB (Decrement Before) IA (Increment After)
op{addr_mode}{cond} Rn{!}, reglist{^}
If ! is present, the final address is written back into Rn.
如果you感叹号把最终地址传给rn。
For example:
STMFD sp!, {r0-r5} ; Push onto a Full Descending Stack
LDMFD sp!, {r0-r5} ; Pop from a Full Descending Stack
5:宏
MACRO 宏名字
{$label} macroname{$cond} {$parameter{,$parameter}...}
; code
MEND
6:
LDR{cond}{.W} Rt, =expr
Rt : is the register to be loaded.
expr :evaluates to a numeric value.
2:ldr指令 装载load 内存--》寄存器
op{type}{cond} Rt, [Rn {, #offset}] ; immediate offset
Rt :is the register to load or store.
Rn :is the register on which the memory address is based
例子:
LDR r8,[r10] ; loads R8 from the address in R10:把r8的数值放入r10所表示的地址。
.
LDRNE r2,[r5,#960]! ; (conditionally) loads R2 from a word 960 bytes above the address in R5, and increments R5 by 960.
3:str指令 存储 store 寄存器--》内存
STR r2,[r9,#consta-struc] : 把r2的值存储到r9的地址constr-struc以上的地址。
consta-struc is an expression evaluating to a constant in the range 0-4095.
4:stm指令 ldm
stmdb :相当于stmfd 先pc减rn再放入sp中
stmia : 先把rn放入sp中,pc然后再加
ldmdb :
ldmia :ldmfd
DB (Decrement Before) IA (Increment After)
op{addr_mode}{cond} Rn{!}, reglist{^}
If ! is present, the final address is written back into Rn.
如果you感叹号把最终地址传给rn。
For example:
STMFD sp!, {r0-r5} ; Push onto a Full Descending Stack
LDMFD sp!, {r0-r5} ; Pop from a Full Descending Stack
5:宏
MACRO 宏名字
{$label} macroname{$cond} {$parameter{,$parameter}...}
; code
MEND
6:
0 0
- 汇编基本指令的学习
- 汇编学习之基本指令
- 基本指令的汇编格式
- 汇编伪指令的学习
- 指令 机器指令 汇编指令 指令系统 汇编指令的基本构成 操作数
- 汇编寄存器基本指令
- 基本汇编指令
- 基本汇编指令集
- 基本汇编指令
- 基本汇编指令集
- 汇编基本指令
- 基本汇编指令
- 基本汇编指令
- 基本汇编指令
- 汇编相关基本指令及初步学习网站
- 汇编学习笔记--转移指令的原理
- 汇编指令学习
- 汇编学习--jmp指令
- 干净卸载 Cloudera CDH 5 beta2(转载)
- python单下划线/双下划线使用总结
- iOS微信支付
- ORA-00119和ORA-00132解决方法
- 前端学习打卡day2--morning
- 汇编基本指令的学习
- mysql基准测试--sysbench
- hdu 5148 Cities(树形背包)
- IOS8开发视频教程之:基于Swift实战UI从入门到精通
- 设计模式之“行为型模式”(二)
- android 学习视频 很全的一套视频 包括实例代码带你了解android
- vim中自动补全的快捷键
- 从乌云看企业安全那些事儿
- Salt-API安装配置及使用