10
- 93
10.10 Pointer (P)
10.10.1 Local pointer
10
DEVICE EXPLANATION
10.10.1 Local pointer
Note28
(1) Definition
Local pointers are pointers which can be used independently in program jump
instructions and subroutine call instructions.
The same pointer No. can be used in each of the programs.
(2) Number of local pointer points
Local pointers can be divided among all the programs stored in the program memory.
The local pointer No. ranges from P0 to the highest No. of the local pointer in use.
(The CPU module OS computes the number of points used.)
Even if only P99 is used in a program, for example, the number of points used will be
counted as 100 between P0 and P99.
When local pointers are used at several programs, the pointer settings should begin
from P0.
Note28
Figure 10.85 Use of the same pointer in each program (Local pointer)
Figure 10.86 Concept of the number of local pointer points
Basic
Note10.26
Since the Basic model QCPU cannot execute multiple programs, it is irrelevant to the difference
between local pointers and common pointers.
When the Basic model QCPU is used, it is not necessary to be conscious of the description in
this section.
Basic
Program B
Program A
P0
P0
CALL P0
FEND
RET
END
CALL P0
FEND
RET
END
Same pointer
is used.
Program A
Program B
Program C
If the local pointer points are used as follows, the total is 600 points.
P0 to P99 used in
program
P100 to P199
used in program
Only P299 is
used in program
Total of 600
points used.
Example
P0 to P99 occupy
100 points
P0 to P199 occupy
200 points
If P0 is used, the
number of occupied
points is 1.
If P0 to P99 are used,
the number of occupied
points is 100.
P0 to P299 occupy
300 points