Chapter 2. Program Organization
18
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
2.1.6
Local Data
Each block or UDFB in a block-
structured program has an associated local data block. _MAIN’s data
block memory is referenced by %P; all other data block memories are referenced by %L.
The size of the data block is dependent on the highest reference in its block for %L and in all blocks
for %P.
Figure 8: Relationship of %L & %P to Program Blocks
All blocks within the program can use data associated with the _MAIN block (%P). Blocks and UDFBs
can use their own %L data as well as the %P data that is available to all blocks. The _MAIN block
cannot use %L.
External blocks and parameterized blocks can use the Local Data (%L) of their calling block as well as
the %P data of the _MAIN block. If a parameterized block or external block is called by MAIN, all %L
references in the parameterized block or external block will actually be references to corresponding
%P references (for example, %L0005 = %P0005). In addition to inheriting the Local Data of their
calling blocks, parameterized blocks and external blocks inherit the FST_EXE status of their calling
blocks.
PSB 1
or
EB 1
BLOCK
1
data
%P
_MAIN
Block
data
%L
Inherits as %L
PSB 2
or
EB 2
Inherits as %L
Figure 9: Local Data (%L) Usage by Program Blocks
Block
2
Block
3
Block
4
data
%L
Data
%L
Data
%L
data
%P
_MAIN
block
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...