
15. CUSTOM MACRO
15. CUSTOM MACRO
A function covering a group of instructions is stored in memory the same as a
subprogram.
The stored function is represented by one instruction, so that only the
representative instruction need be specified to execute the function. This group of
registered instructions is called a “custom macro body” and the representative
instruction is called a “custom macro instruction”. The custom macro body may
simply be called a macro.
And the custom macro instruction may be called a macro
call command.
Regular
program
Custom macro
instruction
. i
Custom macro body
A group of
instructions for a
certain function
Fig. 15 (a) Custom macro instruction and custum macro body
Programmers need only remember representative macro instructions without having to
remember all the instructions in a custom macro body.
The three most significant points on custom macros are that variables can be used in
the custom macro body, operations can be performed on variables and actual values
can be assigned to the variables in custom macro instructions.