TAL Reference Manual
Structures
TAL Reference Manual—526371-001
8-13
Usage Considerations
Usage Considerations
You can declare filler bits and filler bytes, but you cannot access such filler locations.
If the structure layout must match a structure layout defined in another program, your
structure declaration need only include data items used by your program and can use
filler bits or bytes for the unused space. You can also use filler bytes to document
compiler-allocated alignment pad bytes (described in the
TAL Programmer’s Guide).
Examples of Filler Declarations
1. This example shows 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;
2. This example shows a 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;
For more information, see the filler byte example in Definition Substructure Redefinition
on page 8-20.
Simple Pointers Declared in Structures
A simple pointer is a variable that contains the memory address of a simple variable or
an array.
VST0809.vsd
type identifier
. ;
. EXT
,