 RealView Assembler User's Guide |
|
Technical Support On-Line Manuals RealView Assembler User's Guide Preface Introduction Writing ARM Assembly Language Assembler Reference ARM and Thumb Instructions Directives Reference Alphabetical list of directives Symbol definition directives GBLA, GBLL, and GBLS LCLA, LCLL, and LCLS SETA, SETL, and SETS RELOC RN RLIST CN CP Data definition directives LTORG MAP FIELD SPACE or FILL DCB DCD and DCDU DCDO DCFD and DCFDU DCFS and DCFSU DCI DCQ and DCQU DCW and DCWU COMMON DATA Assembly control directives Nesting directives MACRO and MEND MEXIT IF, ELSE, ENDIF, and ELIF WHILE and WEND Frame directives FRAME ADDRESS FRAME POP FRAME PUSH FRAME REGISTER FRAME RESTORE FRAME RETURN ADDRESS FRAME SAVE FRAME STATE REMEMBER FRAME STATE RESTORE FRAME UNWIND ON FRAME UNWIND OFF FUNCTION or PROC ENDFUNC or ENDP Reporting directives ASSERT INFO OPT TTL and SUBT Instruction set and syntax selection directives ARM, THUMB, THUMBX, CODE16 and CODE32 Miscellaneous directives ALIGN AREA ATTR END ENTRY EQU EXPORT or GLOBAL EXPORTAS GET or INCLUDE IMPORT and EXTERN INCBIN KEEP NOFP REQUIRE REQUIRE8 and PRESERVE8 ROUT | EQUThe EQU directive gives a symbolic name to a numeric constant, a register-relative value or a program-relative value. * is a synonym for EQU.
name EQU expr{, type}
where: nameis the symbolic name to assign to the value. expris a register-relative address, a program-relative address, an absolute address, or a 32-bit integer constant. typeis optional. type can be any one of: You can use type only if expr is an absolute address. If name is exported, the name entry in the symbol table in the object file will be marked as ARM, THUMB, CODE32, CODE16, or DATA, according to type. This can be used by the linker.
Use EQU to define constants. This is similar to the use of #define to define a constant in C. See KEEP and EXPORT or GLOBAL for information on exporting symbols.
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
|
|