The description of the data types of user data stored in a bank is encapsulated
by the class TRY_Bank_Type. In Trybos, unlike YBOS, the bank type description
is considered distinct from the user data. Bank types can be initialized and
accessed as either a string or an array; the two representations are equally
valid. The string version of the Bank type representation follows a specific
format which is similar to that used by YBOS's BTYMAK() subprogram. The data
elements can be any one of the supported type descriptors listed in
Table 2 on page
which are currently implemented. Note that mistakes in some bank type
specifications have led to banks with superfluous zero-valued words in the type
specification. For the sake of completeness such null type words are indicated
by the descriptor ``??''.
Table 2: Data Type Descriptors
In YBOS, banks are either mono-type or mixed-type. The exact definition of these terms, however, is actually related to how the type information is stored in YBOS banks, not in the common-sense meaning of the two phrases. In reality, some banks with only one data type specified have chosen the use the ``mixed-type'' format for type information, and thus are mixed-type banks. Few banks do this, so this detail is otherwise ignored in this note.
Ideally, banks consisting of only one data type are refered to as mono-type banks. Their data type is specified by a repeat count (a base-10 integer) followed by a type specification (a two character string), with no whitespace between the two. The repeat count and size of the data type must yield a data size which is a whole number of 4-byte integers. For example, one can declare a mono-type bank type to be 28AS (28 ASCII characters stored in 7 integers), but not 27AS.
Banks with more than one data type specified are referred to as mixed-type banks. Multiple mono-type specifications can be catenated with a comma in the description of a mixed-type bank. Repeated groups within a type specification can be surrounded by parentheses and given a group count prefix. Since any mixed-type bank is implicitly a grouping with count one, all mixed-type banks have outer parentheses, but the outer group count is omitted for brevity. These outer parentheses are required to distinguish between a mono-type bank specification and a mixed-type bank specification with just one data type.
In YBOS, banks are also referred to as either fixed-size or variable-size, depending the whether all banks with that name have exactly the same type specification, not just the same size. In other words, if the type specification varies and the size does not, then the bank is considered to be variable-size. More appropriate terms would have been fixed-type and variable-type, but that is YBOS history.
Examples of bank type descriptions for some common banks are given in
Table 3 on
page
.
Table 3: Bank Type Description Examples