Array can be seen as collection of variables.
An variable is declared as :
a DB 2
b DB 3
c DB 4
Here, a, b and c are variable names. And 2, 3, 4 are values assigned to them.
An array is declaed as:
d DB 2, 3, 4
Array eg. 01: Use of DUP operator
a DB 2,2,2,2,2,2,2,2,2
Using DUP operator,
a DB 9 DUP(2)
Array eg. 02: Use of DUP operator
a DB 1,2,3,1,2,3,1,2,3
Using DUP operator:
a DB 3 DUP (1,2,3)
Array Index Number
For example,
a DB 1,2,3,4,5,6
ArrayName[Index Number] = Value
a[0] = 1
a[1] = 2
a[2] = 3
a[3] = 4
a[4] = 5
a[5] = 6