1.6 struct directive

A directive (pseudo-operation) has the following structure:
 
struct directive {
        Directive_Type dir_type;
        struct argument *arg_list;
};

dir_type

This member specifies the type of the directive. Table 1.6 shows its values.
arg_list
A directive has a number of arguments (see section 1.7) that are stored in a linked list. And this member points to the first argument in the list.

Table 1.6 Directive Types

Value
Directive
Example
ASCII
.ascii "string"[, "string"]*
.ascii "hello", "cs217"
ASCIZ
.asciz "string"[, "string"]*
.asciz "hello"
SECTION
.section "string"
.section ".text"
SKIP
.skip expression
.skip 4*100
ALIGN
.align expression
.align 4
BYTE
.byte expression[, expression]*
.byte 0xff, 0xff, 0xff
HALF
.half expression[, expression]*
.half 0xffff, 0xffff
WORD
.word expression[, expression]*
.word 0xffffffff
GLOBAL
.global symbol[, symbol]*
.global main

table of content