69
Definition of a macro begins with the word 'DEFM' (Define Macro) followed by the name of the
macro. The name may in turn be followed by up to 10 Replaceable Parameters (see page 70) . The
next line must be 'BEGIN'. Thereafter the commands that make up the macro are written in the order
in which they are to be performed. The last line of the macro must be 'END'.
You should note the following:
• Blank lines, and those beginning with an asterisk in the first character position, are ignored.
• The macro name following DEFM cannot contain spaces or commas.
• If one of the following is encountered on a command line:
• an opening curly brace (the closing curly brace is merely treated as part of the
comment),
• a semicolon, or
• a double forward slash.
then everything that follows on that line will be treated as a comment.
• Upper and lower case may be freely mixed.
• Spaces, tabs or commas may be used as separators.
Macros may call other macros, but should not call themselves. When processing a command, Xplor8
checks the command against the list of macro names first, before checking whether the command is
one of the built-in ones. This has the side effect that if a macro is given the same name as one of
Xplor8's native commands, it will supersede the native command, which then becomes inaccessible.
9.3 Boot Script
Command script to run on start up, and before any Autostart Macro (See following section). Any
number of Xplor8 commands may be used, including any macro in the current macro library. This
script is entered on the Settings>Macros tab. It is independent of any macro script nominated
elsewhere and is stored with the project data, not in a separate file. This script may be arranged to run
after:
• Connecting
• Resetting
• Unlocking
• or not at all
Do not include the 'DEFM', 'BEGIN' and 'END' pseudo-commands which are used in macro library
files - see Macros above.
A typical use might be to alter the Flash Block Protect Register after unlocking (where it is
implemented as a RAM location) so that a file may be loaded to FLASH. If the following line is typed
into this box:
R FLBPR=FF
Comentarios a estos manuales