ASSEMBLER DIRECTIVES



Assembler directives are used to declare a section of a program,

variables, strings and/or to align data in memory. The most important

are:

.align n
     Align the next datum on a 2^n byte boundary. For example, .align 2
     aligns the next value on a word boundary. .align 0 turns off
     automatic alignment of .half,.word, .float, and.double directives
     until the next .data or .kdata directive. 
 
.asciiz str
     Store the string in memory and null-terminate it. 
 
.data 
     The following data items should be stored in the data segment. If
     the optional argument addr is present, the items are stored
     beginning at address addr. 
 
.float f1, ..., fn
     Store the  floating point single precision numbers in successive
     memory locations. 
 
.globl sym
     Declare that symbol sym is global and can be referenced from other
     files. 
 
.space n
     Allocate  bytes of space in the current segment (which must be the
     data segment in SPIM). 
 
.text 
     The next items are put in the user text segment. In SPIM, these
     items may only be instructions or words (see the .word directive
     below). If the optional argument addr is present, the items are
     stored beginning at address addr. 
 
.word w1, ..., wn
     Store the  32-bit quantities in successive memory words.