I saw this assignment:
u = &Binary[0][0][0][0]
in a for loop:
for (i = 0, u = &Binary[0][0][0][0]; i < MAX_ADDRESSES; i++, u++)
from this section:
#define ILLEGAL_VALUE 0xFFFF
#define MAX_MODULES 8
#define MAX_SECTORS 16
#define MAX_SYLLABLES 3
#define MAX_WORDS 256
#define MAX_ADDRESSES (MAX_MODULES * MAX_SECTORS * MAX_SYLLABLES * MAX_WORDS)
...
int i;
uint16_t *u;
// Initialize the binary as completely unused.
for (i = 0, u = &Binary[0][0][0][0]; i < MAX_ADDRESSES; i++, u++)
*u = ILLEGAL_VALUE;
for an assembler.
I am not very familiar with c (or other compiled languages), awk is somewhat similar to c.
In awk var[x]
is an array, but this seems not to be an array, or any other variable.
What is this piece of code '&Binary[0][0][0][0]
' ?
Edit:
Indeed I found this:
typedef uint16_t
BinaryImage_t[MAX_MODULES][MAX_SECTORS][MAX_SYLLABLES][MAX_WORDS];
#define ILLEGAL_VALUE 0xFFFF
So it is an array after all !
However I am surprised by the ampersand as the first character of the array name ?