
3. EXECUTION MACRO
B–62093E–1/02
PROGRAMMING
32
(2) Difference between Subprogram Call (T, M) and Macro Call (G, M)
(a)
Argument designation can be made in macro call. In subprogram call,
however, argument designation is not possible without T code, special
code and call code.
(b) In subprogram call, after execution of another command than T–
or M–code, it will branch to a subprogram. In macro call,
however, it will branch off without doing anything.
(c) In subprogram call, single block stop is made when another
command than T– or M–code is commanded. In macro call,
however, no stop is made.
The P–CODE program O9000 registered to the ROM can be called by a
T code.
The commanded T code is stored as an argument in the common variable
#149.
All the local variables will become <Vacant>.
N_ G_ X_ Y _ T < tttt >;
By commanding M codes, the programs O9001, O9002, O9003”
registered as P–CODE program can be called for subprograms. All the
local variables are <Blank>.
N_ G_ X_ Y _ M<mm> ;
By setting character codes (decimal notation of ASCII codes) to the
parameters (No. 6090, 6091) at the time of execution, the P–CODE
program (O9004, O9005) corresponding to the address can be called as
a subprogram. The defined integer will be stored as a parameter to the
macro variable (#146, #147). The actual use of this function is decided
by specifying the appropiate parameter (No. 9002#1, 9002#2, ACL1,
ACL2) at the time of compiling.
Example) Compiler parameter (No. 9002#1, ACL=1)
When parameter No. 6090 = 66 at execution
Definable addresses : A, B, D, F, H, I,J, K, M, Q, R, S, T
User’s program
O0001;
O0001;
:
G00X123Y456B100;
:
M02;
P–CODE program
O9004;(#145=100.)
3.1.1
Calling Subprogram
O9000 by T Code
3.1.2
Calling Subprograms
O9001–9003 by M Code
3.1.3
Calling a Subprogram
Using Specified Codes