• Aucun résultat trouvé

Conditional Assembly Symbol Definition Test Syntax:

Label Operation Operand Comment

IFDEF, symbol IFNDEF, symbol

Where:

symbol Is a program symbol that may or may not have been defined or declared external. No forward references are allowed.

Description: The IFDEF and IFNDEF directives provide a way to test if a symbol has been defined or declared external. Depending on the result of the test, following statements up to the nex ELSEC or ENDC will or will not be assembled.

These directives take a single symbol as an argument that cannot be a forward reference.

IFDEF, IFNDEF

INCLUDE

Include Source File Syntax:

Label Operation Operand Comment

INCLUDE filename

FILE filename

Where:

filename The name of the host computer file to be inserted in the Assembly Source File.

No lower to upper case conversion is performed on file names. If the file name has a suffix ("x.h", for example), the file name is passed without change to the operating system.

If the file name has no suffix ("source", for example), then the suffix ".s" is appended to the filename before it is passed to the operating system.

Description: The INCLUDE (FILE) Directive may be used to insert an external source file into the input source code stream at Assembly time. Include statements may not be nested and have some limitations when combined with macro calls. A macro call may contain an INCLUDE directive, but, if an INCLUDE file is invoked by a macro call, the INCLUDE file may not contain any additional macro calls.

The default search directory (when none is explicitly specified), is the current directory. Additional search paths may be specified on the command line. See the as68k syntax in the on-line manual pages.

Example:

Label Operation Operand Comment INCLUDE EXTERNAL.S

FILE EXTERNAL.S

INCLUDE

[NO]INTFILE

Sorts Information Using Intermediate File or Virtual Memory Syntax:

Label Operation Operand Comment

[NO]INTFILE

Description: The linker, like the assembler, is a two pass program. Intermediate information is stored, by default (for non-PC hosts), using virtual memory between pass 1 and 2. The INTFILE command lets you store this

intermediate information in a temporary file. The NOINTFILE command lets you store this information using virtual memory. Use this command if ER R OR 340 occurs.

With different systems, using a temporary file may be faster than using virtual memory. Also, depending on the configuration for running large jobs, the virtual allocation size can be limited if a virtual error is returned and error message (ER R OR 340) is displayed.

Using the INTFILE command is the same as specifying the -b option on the command line.

Example:

INTFILE LOAD mod1.obj END

[NO]INTFILE

IRP

Specify Indefinite Repeat Syntax:

Label Operation Operand Comment

{label} IR P model parameter{,actual parameter, . . .}

Where:

label An optional label assigned the address of the current program counter.

model parameter The parameter which will be replaced by actual parameters.

actual parameter The actual parameter whose number determines the number of repeats.

Description: The IR P directive specification includes a "model" parameter followed by a list of actual parameters. The sequence of statements enclosed by the IR P and ENDR directives is repeated once for each actual parameter, substituting the actual parameter everywhere the model is found. Parameter substitution is identical to that which is performed in a macro.

The parameter list begins after the model parameter. A null parameter list causes the macro to be expanded one time with a null replacing the model parameter.

Like macro definitions, repeat directives cannot be nested. Only one macro definition may be used inside a repeat directive.

Example:

Label Operation Operand Comment IRP DUMMY,SUB1,SUB2,SUB3

JSR DUMMY ;Three JSR instructions generated . ENDR

IRP

IRPC

Specify Indefinite Repeat Character Syntax:

Label Operation Operand Comment

{label} IR PC model parameter{,actual parameter}

Where:

label An optional label assigned the address of the current program counter.

model parameter The parameter which will be replaced by actual parameters.

actual parameter The actual parameter whose length determines the number of repeats.

Each character in the parameter will be substituted for the model parameter during each repetition.

Description: The IR PC directive specifies a model parameter and a single actual parameter.

The sequence of statements is repeated once for each character of the actual parameter. The IR PC directive may be terminated with the ENDR directive.

The actual parameter list begins after the first parameter. A null actual parameter list causes the macro to be expanded one time with a null replacing the model parameter.

Like macro definitions, repeat directives cannot be nested. Only one macro definition may be used inside a repeat directive.

Example:

Label Operation Operand Comment IRPC DUMMY,1234

MOVE #DUMMY,D0 ;Four MOVE and JSR instructions JSR SUB ;are generated.

ENDR

IRPC

LIST

Turn On Source Listing

Label Operation Operand Comment

LIST

Description: This directive causes a listing of the assembly to be printed. This is the default. (The OPT S directive is another way to indicate a listing of the assembly is to be printed.)

LIST

LLEN

Change Length of Output Listing Line Syntax:

Label Operation Operand Comment

LLEN n

Where:

n An absolute expression whose value is between 37 and 1100 inclusive. Forward references are not allowed.

Description: This directive changes the length of the line on the source listing. The user specifies the new length, which must be between 37 and 1100 inclusive. The value of 116 allows printing of the full 80 columns of the input source. The default value for the line length is 132.

This directive does not affect the header lines at the top of each page, which are printed in a format of fixed length.

LLEN

MASK2

Generate Code for R9M

This directive is recognized for Motorola compatibility but is ignored.

MASK2

NAME

Specify Module Name Syntax:

Label Operation Operand Comment

NAME modulename

Where:

modulename The name to be placed in the object module denoting the module name to the loader.

Modulename is specified as an arbitrary sequence of characters from the first non-white-space character following NAME through the end of the line.

Note Because the modulename is everything up to the end of the line, a comment field used with the NAME directive will cause the comment to become part of the modulename.

Description: The NAME directive is used to assign a name to the object module produced by the assembler. It is identical in function to the IDNT directive. However, the syntax of NAME allows the module name to be an arbitrary sequence of characters while IDNT allows only legal identifiers. Only one NAME or IDNT directive should appear in a program.

If a NAME or IDNT directive is not specified, the default module name is the input file name (without path and extension).

NAME

NOLIST

Turn Off Source Listing

Label Operation Operand Comment

NOLIST

Description: This directive suppresses printing of the assembler listing. The OPT -S directive may also be used to suppress the listing.

NOLIST

NOOBJ

Suppress Creation of Output Object Module

Label Operation Operand Comment

NOOBJ

Description: This directive suppresses creation of the output object module. The OPT -O directive may also be used for this purpose.

NOOBJ

NOPAGE

Suppress Paging on Listing

Label Operation Operand Comment

NOPAGE

Description: This directive suppresses all page ejects and page headers on the output listing, including those explicitly specified by the PAGE directive. NOPAGE affects the entire listing, no matter where the directive appears in the program.

Once paging has been disabled it cannot be re-enabled.

NOPAGE

OFFSET

Define Table of Offsets

Label Operation Operand Comment

{label} OFFSET n

Where:

label An optional label to identify the offset location.

n An absolute expression containing no forward references.

Description: This directive is used to define a table of absolute offsets. It is present for convenience and compatibility, but performs no function that cannot be handled with EQU’s. The OFFSET directive is much like OR G in that it terminates the previous section and alters the Location Counter to an absolute value. However, an OFFSET "section" may not contain code and instructions, DC and DCB directives are illegal within an OFFSET section.

OFFSET has one operand, which is an expression that must be absolute and must contain no forward or external references. This required operand is the new value for the Location Counter. The OFFSET "section" is terminated by an OR G, OFFSET, SECT, SECTION, COMMON or END directive.

The usual use for OFFSET is to define a storage template in mnemonic terms.

For example, suppose we want to define symbols to represent the beginnings of the 80 column rows of an 80 column by 24 row character terminal screen.

Suppose further that we define an area of memory called SCR EEN and that we will address the rows as SCR EEN+ R OW1, SCR EEN+ R OW2, and so on.

The following example uses EQU to achieve the purpose.

Label Operation Operand Comment

A clearer alternative for complex structures is the use of OFFSET.

OFFSET

Label Operation Operand Comment SCREEN DS.B 80*24

OFFSET 0 ROW1: OFFSET 80 ROW2: OFFSET 80 .

. .

ROW24: OFFSET 80 END

OFFSET

Documents relatifs