A local label is a symbol that represents an address and has local scope: the range forward and backward within the file to the points where the assembler encounters non-local labels.
The first character of a local label must be an at-sign (@). The subsequent characters of a local label can be:
Within an expanded macro, the scope of local labels works differently:
The following listing shows the scope of local labels in macros: the @SKIP label defined in the macro does not conflict with the @SKIP label defined in the main body of code.
MAKEPOS .MACRO cmp #1, d0 bne @SKIP neg d0 @SKIP: ;Scope of this label is within the macro .ENDM START: move COUNT, d0 cmp #1, d0 bne @SKIP MAKEPOS @SKIP: ;Scope of this label is START to END ;excluding lines arising from ;macro expansion addq #1, d0 END: rts