There is a list of predefined macros and directives provided by Processor Expert.
To replace a macro by its value, write the name of macro after character %. Each line of the driver is processed from the right side to the left side, and all macros are replaced.
Special macros and directives:
- %% - character %
- %{def_name}, %'{def_name}', %"{def_name}", %~{def_name}~ - is replaced by def_value.
- %for_index_1 - is replaced by index of actual variable of for-cycle from range: 1...number of items in the list.
- %for_index_0 - is replaced by index of actual variable of for-cycle from range: 0...number of items in the list-1.
- %list_size({def_list}) - number of items in the list.
- %str_length({string}) - string length; number of characters in the string
- %str_length({def_name}) - string length; number of characters of the macro value. Macro cannot be a list.
- %short_path({value}) - converts path to short path for MS-DOS 16-bit application. The value must be macro or string between brackets. The path should exist on the disk.
- %[{index},{def_list}] - returns item from the list def_list with index equal to index. Index of first items is 1. Result is empty string if the requested index is out of range. def_list must be defined.
- %; - is replaced by sequence of characters that defined comment to the end of line. See also global macro %CommentLine.
- %. - is replaced by separator of module name and method name. The separator is defined according to selected language, usually it is character _ (underscore).
- %{ - is replaced by sequence of characters that begins a multi-line comment.
- %} - is replaced by sequence of characters that ends a multi-line comment.
- %#{srcf}{dstf}[-]{number} - contents signed 32-bit integer number from srcf to dstf format. Supported formats of srcf:
- nothing - decimal number
- 2 - binary number
Supported formats of dstf:
- h - selected format of high level language
- a - selected format of assembler - data
- aa - selected format of assembler - address
- ab - selected format of assembler - binary data
- %#b{number} - converts 8-bit number (0...256) from decimal to hexadecimal format (without prefix or suffix)
- %#w{number} - converts 16-bit number (0...65535) from decimal to hexadecimal format (without prefix or suffix)
- %#l{number} - converts 32-bit number from decimal to hexadecimal format (without prefix or suffix)
Access to inherited items:
- %@{inhr_property}@{def_name} - value of macro def_name from inherited component pointed by property inhr_property.
- %[@{inhr_property}@{index},{def_list}] - returns item from the list from inherited component, with item's index equal to index. inhr_property is a symbol of property for inheritance.