|
|||||||||||
Technical Support On-Line Manuals Migration and Compatibility Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Labels
5.4 LabelsLabels are symbolic representations of addresses. You can use labels to mark specific addresses that you want to refer to from other parts of the code. armasm syntaxA label is written as a symbol beginning in the first column. A label can appear either in a line on its own, or in a line with an instruction or directive. Whitespace separates the label from any following instruction or directive: MOV R0,#16 loop SUB R0,R0,#1 ; "loop" is a label CMP R0,#0 BGT loop GNU syntaxA label is written as a symbol that either begins in the first column, or has nothing but whitespace between the first column and the label. A label can appear either in a line on its own, or in a line with an instruction or directive. A colon ":" follows the label (whitespace is allowed between the label and the colon): MOV R0,#16 loop: // "loop" label on its own line SUB R0,R0,#1 CMP R0,#0 BGT loop MOV R0,#16 loop: SUB R0,R0,#1 // "loop" label in a line with an instruction CMP R0,#0 BGT loop Related referencesRelated information | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.