4.4.2 The Special Dot Symbol
The special symbol .
refers to the
current address being processed by the assembler. Thus, the expression melvin: .long .
defines a label melvin
and places the address of that label in the output. Assigning a value
to .
is treated the same as an .org
directive. Thus, the expression .=.+4
is the same as saying .space 4
.
When used in an executable section,
.
refers to a Program Counter address. Ensure that any instructions following where the dot
symbol has been modified are properly aligned to the instruction width. For example, if a
section contains instructions that are 32-bit wide, the address should be aligned to 4
bytes before any instructions are placed, for
example:.=.+20
.align 4
moreCode:
li $2, 55