384
Special Instructions
Section 5-28
The following restrictions apply when the macro function is used.
• The only words that can be used for each execution of the macro are the
four consecutive words beginning with the first input word number (for
input) and the four consecutive words beginning with the first output word
(for output).
• The specified inputs and outputs must correctly correspond to the words
used in the subroutine.
• Even when the direct output method is used for outputs, subroutine
results will be actually reflected in the specified output words only when
the subroutine has been completed (step 3 above).
Note
IR 096 to IR 099 and IR 196 to IR 199 can be used as work bits when
MCRO(99) is not used.
The first input word and the first output word can be specified not only with I/O
bits, but also with other bits (such as HR bits, work bits, etc.) or with DM
words.
Subroutines called by MCRO(99) are defined by SBN(92) and RET(93), just
as are ordinary subroutines.
Application Example
When a macro is used, the program can be simplified as shown below.
Flags
ER:
A subroutine does not exist for the specified subroutine number.
An operand has exceeded a data area boundary.
10000
00000
10001
10000
10001
00001
10500
00200
10501
10500
10501
00201
00202
12000
00500
12001
12000
12001
00501
00502
15000
01000
15001
15000
15001
01001
01002
19600
09600
19601
19600
19601
09601
RET(93)
MCRO(99)
090
000
100
MCRO(99)
090
002
105
MCRO(99)
090
005
120
MCRO(99)
090
010
150
25313 (Always ON)
00002
19602
SBN(92) 090
Macro not used
Macro used
Subroutine used
to define macro