keil
startup
EQU
name EQU expr{, type}
Usage
- equal
- Use EQU to define constants. This is similar to the use of #define to define a constant in C.
Examples
abc EQU 2 ; Assigns the value 2 to the symbol abc.
xyz EQU label+8 ; Assigns the address (label+8) to the symbol xyz.
fiq EQU 0x1C, CODE32 ; Assigns the absolute address 0x1C to the symbol fiq, and marks it as code.
SPACE
{label} SPACE expr
{label} FILL expr{,value{,valuesize}}
Usage
Use the ALIGN directive to align any code following a SPACE or FILL directive.
Examples
AREA MyData, DATA, READWRITE
data1 SPACE 255 ; defines 255 bytes of zeroed store
data2 FILL 50,0xAB,1 ; defines 50 bytes containing 0xAB
AREA
AREA sectionname{,attr}{,attr}...
The AREA directive instructs the assembler to assemble a new code or data section.
THUMB
THUMB指令指示汇编程序使用UAL语法将后续指令解释为Thumb指令
PRESERVE8
REQUIRE8和PRESERVE8指令指定当前文件需要或保留堆栈的八字节对齐
EXPORT
EXPORT指令声明了一个符号,链接器可以使用该符号来解析单独的对象和库文件中的符号引用。 GLOBAL是EXPORT的同义词
DCD
{label} DCD{U} expr{,expr}
DCD指令分配一个或多个内存字,在四字节边界上对齐,并定义内存的初始运行时内容。 DCDU是相同的,除了存储器对齐是任意的
IF
LNOT
逻辑非
IF :LNOT::DEF:__MICROLIB ;如果没有定义__MICROLIB
ARM
LDR
LDR register, =[expr | label-exp]
The LDR pseudo-instruction loads a low register with either:
- a 32-bit constant value
- an address.
Examples
LDR r1, =0xfff ; loads 0xfff into r1
LDR r2, =labelname ; loads the address of labelname into r2
BLX
BLX{cond}{.W} label
BLX{cond} Rm
带链接的跳转
BX
跳转
网友评论