pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Example 88 Filler Byte Declarations
LITERAL last = 11; ! Last occurrence
STRUCT .x[1:last];
BEGIN
STRING byte[0:2];
FILLER 1; ! Document word-alignment pad byte
INT word1;
INT word2;
INT(32) integer32;
FILLER 30; ! Place holder for unused space
END;
See also the filler byte example in Definition Substructure (page 155).
Example 89 Filler Bit Declaration
STRUCT .flags;
BEGIN
UNSIGNED(1) flag1;
UNSIGNED(1) flag2;
UNSIGNED(2) state; ! State = 0, 1, 2, or 3
BIT_FILLER 12; ! Place holder for unused space
END;
Declaring Simple Pointers in Structures
A simple pointer is a variable that contains the memory address of a simple variable or an array.
When you declare a simple pointer inside a structure, the form is:
VOLATILE
specifies that the value of this variable must be maintained in memory, not in a register. Each
reference to a VOLATILE data item causes the data item to be read or written to memory even
when code is optimized. Based on the order of reads and writes in the source code, VOLATILE
also causes that precise order of memory references to be preserved, again, when code is
optimized.
type
is any data type except UNSIGNED. The data type determines how much data the simple
pointer can access at a time—a byte, word, doubleword, or quadrupleword.
148 Structures