概述
DCB
The DCB directive allocates one or more bytes of memory, and defines the initial runtime contents of the memory.
Syntax
{label} DCB expr{,expr}...
where:
expr
is either:
• A numeric expression that evaluates to an integer in the range -128 to 255.
• A quoted string. The characters of the string are loaded into consecutive bytes of store.
Usage
If DCB is followed by an instruction, use an ALIGN directive to ensure that the instruction is aligned.
= is a synonym for DCB.
Example
Unlike C strings, Arm assembler strings are not nul-terminated. You can construct a nul-terminated C
string using DCB as follows:
C_string DCB "C_string",0
最后
以上就是孤独冰淇淋为你收集整理的ARM 学习笔记之9: 常用命令 DCB的全部内容,希望文章能够帮你解决ARM 学习笔记之9: 常用命令 DCB所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复