You can use the SIZEOF operator to retrieve the size of a variable or expression, if that variable or expression has a type.

Syntax

SIZEOF expression

The SIZEOF operator returns an integer value which is the size of the type associated with the expression. The assembler reports an error if the expression has no type.

Example
X       VAR     LONG[100]

XSIZE   EQU     SIZEOF X      ; 400, 100 four-byte elements

X0SIZE  EQU     SIZEOF X[0]   ; 4, size of LONG