TAL Reference Manual
Statements
TAL Reference Manual—526371-001
12-37
Examples of STACK Statements
track of the size and data type of stacked values. It loads byte values in bits <8:15>
and a 0 in bits <0:7>.
Modularize any use of STACK statements as much as possible; they are not portable
to future software platforms.
Examples of STACK Statements
This example loads values of various data types onto the register stack:
For more information on examples of STACK Statements, see the STORE Statement
.
STORE Statement
The STORE statement removes values from the register stack and stores them into
variables.
variable
is the identifier of a variable—a simple variable, array element, simple pointer, or
structure data item—with or without a bit deposit field and/or index. To update the
content of a simple pointer, prefix the pointer identifier with @. If you list multiple
identifiers, storage begins with the leftmost identifier.
Usage Considerations
The data type of each variable specified dictates the number of registers to unload,
starting at the current setting of the RP. If the RP setting is too small to satisfy the
variable data type, the compiler removes the required number of items from the data
stack, places them on the register stack, and stores them in the variable.
9
03
300
0
R[0]
R[1]
R[2]
R[3]
R[4]
RP
VST1224.vsd
STACK b[2], wrd, 300, dwrd;
STRING .b[0:2] := [1,2,3];
INT wrd := 9;
INT(32) dwrd := 0D;
,
variableSTORE
VST1221.vsd