TAL Programmer's Guide

Declaring Fillers
Using Structures
8–16 096254 Tandem Computers Incorporated
Declaring Fillers You can declare filler bytes or bits to allocate place holder space within a structure.
You cannot access filler locations.
You can use filler items to allocate space within a structure when the structure layout
must match a structure layout defined by another program. The new structure
declaration need only include data items used by your program. You can use filler
items for the unused data.
You can use filler declarations to produce clearer source code. For example, you can:
Document pad bytes or bits that would otherwise be inserted by the compiler
Provide place holders for unused space in the structure
The compiler allocates space for each byte or bit you specify in a filler declaration. If
the alignment of the next data item requires additional pad bytes or bits, the compiler
allocates those also.
Declaring Filler Bytes You declare filler bytes within a structure by specifying the number of filler bytes as a
constant expression in the range 0 through 32,767 as follows:
FILLER 5;
You can use filler byte declarations to document unused bytes in a structure:
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;
Declaring Filler Bits You declare filler bits within a structure by specifying the number of filler bits as a
constant expression in the range 0 through 255 as follows:
BIT_FILLER 5;
You can use filler bit declarations to document unused bits in a structure:
STRUCT .flags;
BEGIN
UNSIGNED(1) flag1;
UNSIGNED(1) flag2;
UNSIGNED(2) state; !State = 0, 1, 2, or 3
BIT_FILLER 12;
END;