Labels
The label entry is optional. The assembler gives the label the value contained in the assembler’s current location counter.
The label entry is optional. A line may have zero, one, or more labels. Moreover, a line may have a label but no other contents.
To define a label, place a symbol before the : (colon). The assembler
gives the label the value contained in the assembler's current location
counter. This value represents a relocatable address. For example:
subtr: sf 3,4,5
# The label subtr: receives the value
# of the address of the sf instruction.
# You can now use subtr in subsequent statements
# to refer to this address.
If the label is in a statement with an instruction that causes
data alignment, the label receives its value before the alignment
occurs. For example:
# Assume that the location counter now
# contains the value of 98.
place: .long expr
# When the assembler processes this statement, it
# sets place to address 98. But the .long is a pseudo-op that
# aligns expr on a fullword. Thus, the assembler puts
# expr at the next available fullword boundary, which is
# address 100. In this case, place is not actually the address
# at which expr is stored; referring to place will not put you
# at the location of expr.