You can declare arrays of any predefined or user-defined type. Arrays are used extensively in high-level languages, and therefore we decided they should be available in the CrossWorks assembler to make integration with C easier.

An array type is constructed by specifying the number of array elements in brackets after the data type.

Syntax

type [ array-size ]

This declares an array of array-size elements each of data type type. The array size must be an absolute constant known at assembly time.

Example

The type

BYTE[8]

declares an array of eight bytes.