These directives do not generate data corresponding to themselves but controls generation of machine code for instructions. They do not modify addresses.
These directives define macro functions and repeat macro functions.
Indicates the start position of a specified string in another specified string. |
|
Extracts a specified number of characters from a specified position in a specified string. |
This directive defines a macro name.
This directive defines a macro name.
It also specifies the beginning of a macro definition.
Be sure to specify a macro name.
For the macro name and parameter name format, refer to the Rules for Names in section 4.1.2, Names.
Use a unique name for defining each parameter, including the nested macro definitions.
To define multiple parameters, separate them by commas (,).
Make sure that all parameters specified as operands of a .MACRO directive are used in the macro body.
Be sure to insert a space character or a tab between a macro name and an argument.
Write a macro call so that the arguments correspond to the parameters on a one-to-one basis.
To use a special character in an argument, enclose it within double-quotes.
A label, a global label, and a symbol can be used in an argument.
An expression can be used in an argument.
Parameters are replaced with arguments from left to right in the order they appear.
If no argument is specified in a macro call while the corresponding parameter is defined, the assembler does not generate code for this parameter.
If there are more parameters than the arguments, the assembler does not generate code for the parameters that do not have the corresponding arguments.
When a parameter in the body is enclosed within single-quotes ('), the assembler encloses the corresponding argument within single-quotes when outputting it.
When an argument contains a comma (,) and the argument is enclosed within parentheses (( )), the assembler converts the argument including the parentheses.
If there are more arguments than the parameters, the assembler does not process the arguments that do not have the corresponding parameters.
The string enclosed within double-quotes is processed as a string itself. Do not enclose parameters within double-quotes.
Up to 80 parameters can be specified within the maximum allowable number of characters for one line.
If the number of arguments differs from that of the parameters, the assembler outputs a warning message.
This directive terminates expansion of a macro body and passes control to the nearest .ENDM.
This directive terminates expansion of a macro body and passes control to the nearest .ENDM.
Write this directive in the body of a macro definition.
This directive declares that the label specified as an operand is a macro local label.
This directive declares that the label specified as an operand is a macro local label.
Macro local labels can be specified multiple times with the same name as long as they are specified in different macro definitions or outside macro definitions.
Write this directive in a macro body.
Be sure to insert a space character or a tab between this directive and the operand.
Make sure that a macro local label is declared through this directive before the label name is defined.
For the macro local name format, refer to the Rules for Names in section 10.1.2, Names.
Multiple labels can be specified as operands of this directive by separating them by commas. Up to 100 labels can be specified in this manner.
When macro definitions are nested, a macro local label in a macro that is defined within another macro definition (outer macro) cannot use the same name as that used in the outer macro.
Up to 65,535 macro local labels can be written in one assembly source file including those used in the include files.
This directive specifies the end of a macro definition.
This directive specifies the end of a macro definition.
This directive specifies the beginning of a repeat macro.
This directive specifies the beginning of a repeat macro.
The assembler repeatedly expands the body the specified number of times.
The repetition count can be specified within the range of 1 to 65,535.
Repeat macros can be nested up to 65,535 levels.
The macro body is expanded at the line where this directive is written.
Be sure to specify an operand.
Be sure to insert a space character or a tab between this directive and the operand.
A label can be specified at the beginning of this directive line.
A symbol can be specified as the operand.
Forward reference symbols must not be used.
An expression can be used in the operand.
Macro definitions and macro calls can be used in the body.
The .EXITM directive can be used in the body.
This directive specifies the end of a repeat macro.
This directive specifies the end of a repeat macro.
Make sure this directive corresponds to an .MREPEAT directive.
This directive indicates the number of arguments in a macro call.
This directive indicates the number of arguments in a macro call.
This directive can be used in the body in a macro definition through .MACRO.
This example executes conditional assembly according to the number of macro arguments.
This directive can be used as a term of an expression.
If this directive is written outside a macro body defined through .MACRO, its value becomes 0.
This directive indicates the count of repeat macro expansions.
This directive indicates the count of repeat macro expansions.
This directive can be used in the body in a macro definition through .MREPEAT.
This directive can be specified in an operand of conditional assembly.
This directive can be used as a term of an expression.
If this directive is written outside a macro body defined through .MACRO, its value becomes 0.
This directive indicates the length of the string specified as the operand.
This directive indicates the length of the string specified as the operand.
Be sure to enclose the operand within {}.
A space character or a tab can be inserted between this directive and the operand.
Characters including spaces and tabs can be specified in a string.
Be sure to enclose a string within single-quotes or double-quotes.
This directive can be used as a term of an expression.
To count the length of the macro argument, enclose the parameter name within single-quotes. When the name is enclosed within double-quotes, the length of the string specified as the parameter is counted.
This directive indicates the start position of a search string within a specified string.
.INSTRΔ{"<string>","<search string>",<search start position> } .INSTRΔ{'<string>','<search string>',<search start position> } |
This directive indicates the start position of a search string within a specified string.
The position from which search is started can be specified.
This example detects the position (7) of string "se", counted from the beginning (top) of a specified string (japanese):
point_set .MACRO source,dest,top point .EQU .INSTR{'source','dest',top} |
Be sure to enclose the operand within {}.
Be sure to specify all of a string, a search string, and a search start position.
Separate the string, search string, and search start position by commas.
Neither space character nor tab can be inserted before or after a comma.
A symbol can be specified as a search start position.
When 1 is specified as the search start position, it indicates the beginning of a string.
This directive can be used as a term of an expression.
This directive is replaced with 0 when the search string is longer than the string, the search string is not found in the string, or the search start position value is larger than the length of the string.
To expand a macro by using a macro argument as the condition for detection, enclose the parameter name within single-quotes. When the name is enclosed within double-quotes, the macro is expanded by using the enclosed string as the condition for detection.
This directive extracts a specified number of characters from a specified position in a specified string.
.SUBSTRΔ{"<string>",<extraction start position>,<extraction character length> } .SUBSTRΔ{ '<string>',<extraction start position>,<extraction character length> } |
This directive extracts a specified number of characters from a specified position in a specified string.
The following example passes the length of the string given as an argument of a macro to the operand of .MREPEAT.
The ..MACREP value is incremented as 1 -> 2 -> 3 -> 4 every time the .BYTE line is expanded. Consequently, the characters in the string given as an argument of the macro is passed to the operand of .BYTE one by one starting from the beginning of the string.
Be sure to enclose the operand within {}.
Be sure to specify all of a string, an extraction start position, and an extraction character length.
Separate the string, extraction start position, and extraction character length by commas.
Symbols can be specified as an extraction start position and an extraction character length. When 1 is specified as the extraction start position, it indicates the beginning of a string.
Characters including spaces and tabs can be specified in a string.
Be sure to enclose a string within single-quotes or double-quotes.
This directive is replaced with 0 when the extraction start position value is larger than the string, the extraction character length is larger than the length of the string, or the extraction character length is set to 0.
To expand a macro by using the macro argument as the condition for extraction, enclose the parameter name within single-quotes. When the name is enclosed within double-quotes, the macro is expanded by using the enclosed string as the condition for extraction.