Directives are used to instruct the assembler to perform some special operation for the
following statement, rather than treating it as a normal assembly language instruction.
.blkb expr
Reserves expr bytes (8 bits) of memory and fills them with zero.
.byte 20 ; reserves 20 bytes of space
.byte expr [ , expr ]
Reserves one or more bytes (8 bits) of memory with values taken from the expressions,
e.g.
.byte 3 ; reserves one byte with contents 3
.byte 2, 3, 5, 7 ; reserves four consecutive bytes
; with values 2, 3, 5, 7
.blkw expr
Reserves expr words (16 bits) of memory and fills them with zero.
.word expr [ , expr ]
Reserves one or more words (16 bits) of memory with values taken from the
expressions.
.blkl expr
Reserves expr longwords (32 bits) of memory and fills them with zero.
.int expr [ , expr ]
.long expr [ , expr ]
Reserves one or more longwords (32 bits) of memory with values taken from the
expressions.
.quad expr [ , expr ]
Reserves one or more quadwords (64 bits) of memory with values taken from the
expressions.
.octa expr [ , expr ]
Reserves one or more actawords (128 bits) of memory with values taken from the
expressions.
.ascii string [ , string ]
.asciz string [ , string ]
Stores an ASCII string as consecutive bytes in memory. Asciz terminates the string
with a null character (a zero byte) while ascii does not.
Strings consist of a sequence of ASCII characters enclosed in double quotes, e.g.
.ascii "This is a string"
.float floatConstant [ , floatConstant]
.ffloat floatConstant [ , floatConstant]
Reserves one or more F float format longwords (32 bits) of memory with values taken
from the numbers.
.double DfloatConstant [ , DfloatConstant]
.dfloat DfloatConstant [ , DfloatConstant]
Reserves one or more D float format longwords (64 bits) of memory with values taken
from the numbers.
.gfloat gfloatConstant [ , gfloatConstant]
Reserves one or more G float format longwords (64 bits) of memory with values taken
from the numbers.
.hfloat hfloatConstant [ , hfloatConstant]
Reserves one or more H float format longwords (128 bits) of memory with values taken
from the numbers.
.enter ^M<[rn, ... rm], [iv],[dv]>
This is a special form of the .word directive used in a .code segment to reserve a word of
memory for the procedure mask at the start of a procedure.
.enter ^M<r2, r3> ; Procedure mask to save r2 and r3 on entry
.space space_expr [ , fill_expr ]
Reserves space_expr consecutive bytes in memory, and fills them with the value
contained in fill_expr. If fill_expr is omitted, it defaults to 0, e.g.
.space 12, 0xF ; fill 12 bytes with value 1510
.space 20 ; Reserve 20 bytes (filled with 0)
.fill rep_expr , size_expr , fill_expr
Fill_expr, treated as an expression of size size_expr bytes, is assembled and replicated
rep_expr times. Note that size_expr must be between 1 and 8.
.fill 8, 2, 0xFFFF ; Reserve 8 words (16 bytes) with
; value 0xFFFF
.align align_expr [, fill_expr]
The location counter is incremented to the next address which is divisible by
2align_expr bytes. This is done by filling from 0 to 2align_expr bytes with the the low order byte of fill_expr. If present, fill_expr must be absolute; otherwise it defaults to zero. eg.
.align 2 ; Pads using null bytes to make location
; counter evenly divisible by 4
.set name, expression
Sets the value of name to expression. Any existing value for name is overwritten.
.set RecordSize, 12
.set NoRecords, 8
Array: .blkb RecordSize*NoRecords ; reserve 96 bytes
.include "filename"
Reads in the file filename, and assembles it as though it were part of the current file.
.origin address
The code is generated from address address on. The .origin can only be used at the start
of code segment 0. The data is relocated to the end of the generated code. The primary use for this directive is to relocate system code.
.text address
.code address
.data address
.line address
.file address
.boot address
.glob address
.comm address
.lcomm address
.lsym address
.org address