Conversion from: GNU-style Arm Assembly syntax Guide (very detailed) 4
4. GNU assembly language definition entry point
The default entry for assembler is_ StartLabel,You can also use the entry mark in the connection script file to specify other entry points..
Example: Define the entry point
. Section. Data
<Initialized data here>
. Section. BSS
<Uninitialized data here>
. Section. Text
. Globl _ start
_ Start:
<Instruction code goes here>
5. macro definition in GNU Assembler
The format is as follows:
. Macro macro name parameter name list @ pseudodirective. Macro defines a macro
Macro
. Endm @. endm indicates that the macro ends.
If a macro uses a parameter, the prefix is added when the macro uses this parameter."\". Default values can also be used for macro-defined parameters. You can use the. exitm pseudo command to exit the macro.
For example, macro definition
. Macro shiftleft a, B
. If \ B <0
Mov \ A, \ A, ASR #-\ B
. Exitm
. Endif
Mov \ A, \ A, LSL # \ B
. Endm