OK. I may not have explained my problem or what it is that I am after very clearly. I will give it another go.
This is a much simplified example. (Both Data and IDX arrays have several 100 elements)
IDX is a 2 Dimensional Array: Its sole purpose is to provide pointer (position) addresses to place Data in DATA[255] array.
IDX[10,10] ' Read only and contains values that are CONSTANTS.
IDX[1,1] = 1 ' Constant
IDX[1,2] = 2 ' Constant
...
IDX[1,9] = 9 ' Constant
IDX[5,1] = 100 ' Constant
IDX[2,2] = 55 ' Constant
...
IDX[4,9] = 9 ' Constant
ALL ELEMENT VALUES ARE WITHIN 0 to 254 AND ARE WITHIN THE (HI/LOW)LIMIT RANGES OF MY DATA ARRAY.
Data[255] Array ' Single dimension
I want to indirectly Address Data[255] like......
Data[IDX[5,1]] Data[IDX[1,1]] Data[IDX[1,9]]
Which would be the same as saying......
Data[100] Data[1] Data[9]
Basically, IDX[x,y] are place holders to tell the program where to place the data in data array DATA[255].
This is not working. I tried with a single dimensional array for the indirect address as well and that does not work either. But in theory, they both should.
NOTE:
In the real program.....I want to carry out the Indirect addressing by referencing the first dimension value via a tag that has a dynamic value. But that dynamic value is limit checked to ensure it is within the bounds of the IDX array's first dimension.
So for an example....
Without saying
Data[IDX[5,1]] it will be Data[IDX[Z,1]] where Z will contain the element value of the first dimension that is to be referenced.
So in a nutshell.....
Data[IDX[5,1]] ' Does not work ' IDX = Multi-dimensional array
Data[IDX[5]] ' Does not work ' IDX = One-dimensional array
DATA[x] ' X works. X= Tag
DATA[X*A+B] ' Works X, A, & B = Tags (or can be constants)
So, a pointer to an array element, does not seem to work with indirect addressing.
I sort of did a work around by using a base address Tag and then incrementing that Tag value by an offset (Tag) value to route data to desired registers. Ugly way of doing it though. Specially when you want to place lots of data in a table.