[prev] 36 [next]

Directives

Directives (instructions to assembler, not MIPS instructions)

    .text        # following instructions placed in text
    .data        # following objects placed in data

    .globl       # make symbol available globally

a:  .space 18    # uchar a[18];  or  uint a[4];
    .align 2     # align next object on 22-byte addr

i:  .word 2      # unsigned int i = 2;
v:  .word 1, 3, 5  # unsigned int v[3] = {1,3,5};
h:  .half 2, 4, 6  # unsigned short h[3] = {2,4,6};
bb: .byte 1, 2, 3  # unsigned char bb[3] = {1,2,3};
f:  .float 3.14  # float f = 3.14;

s:  .asciiz "abc"
                 # char s[4] {'a','b','c','\0'};
t:  .ascii "abc"
                 # char s[3] {'a','b','c'};