Go backward to The EQU Directive
Go up to Directives
Go forward to The ASCII Directive

The GLOBAL directive

The GLOBAL directive replaces the DS directive provided by most 68000 assemblers as the means to allocate storage for global variables. A GLOBAL directive takes the form:
global declaration-list
The declaration list is a list of declarations separated by commas. A declaration is either simply an identifier or an identifier followed by a parenthesized integer constant. Specifying a simple identifier as a declaration in a GLOBAL directive asks the assembler to associate the identifier used with a single word of memory. Specifying an identifier followed by a constant causes the assembler to reserve a number of words equal to the constant's value and associate the identifier with the first word reserved.

For example, the global directive

global a, b, c(10), d
Causes the allocation of a word for each of the names `a', `b' and `d' and the allocation of an array of 10 words for `c'.

More than one global declaration may appear in a program.



Prev Up Next