SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Internal Structures
SPI Programming Manual427506-006
C-6
Single-Occurrence Tokens
255, then the first word of the value gives the (noninclusive) length in bytes of the rest
of the value.
Single-Occurrence Tokens
Single occurrences of token codes and token values are stored contiguously in the SPI
buffer (see Figure C-3
). A padding byte is emitted where necessary so that each token
code begins on a word boundary.
Multiple-Occurrence Tokens
To save space, multiple occurrences of the same token code are prefixed by a table
header (see Figure C-4
). The first two words of the table header are a token code with
a token type of ZSPI-TYP-SSTBL (consisting of token data type ZSPI-TDT-SSTBL and
token length 255) and a token number of ZSPI-TNM-TBLHDR. (The definitions just
named are in the SPI standard definition files but are not described in Section 4, ZSPI
Data Definitions. They are for HP internal use only.)
The table header for multiple-occurrence tokens has this structure:
STRUCT ZSPI^DDL^TBLHDR^DEF(*);
BEGIN
INT(32) Z^TBL^TKNCODE; ! Token code for table
INT Z^TBL^BYTELEN; ! Length of table (in bytes)
INT Z^TBL^COUNT; ! Number of occurrences
STRUCT Z^TBL^TKN[0:-1]; ! Token code for tbl values
BEGIN
INT(32) Z^TKNCODE;
STRUCT Z^TKN = Z^TKNCODE;
BEGIN
Figure C-3. Single-Occurrence Tokens as Stored in the Buffer
Figure C-4. Multiple-Occurrence Tokens as Stored in the Buffer
...
Token Code Value Token Code Value
VST025.vsd
...
Table Header Value (0) Value (1) Value (2)
VST026.vsd