gs99 wrote
No example is provided, so I made one: foo is at 1600.
If the value of j is 0, foo[0] = 1600 + (16 * j) (16 * 0) (0) = 1600.
If the value of j is 1, foo[1] = 1600 + (16 * j) (16 * 1) (16) = 1616.
If the value of j is 2, foo[2] = 1600 + (16 * j) (16 * 2) (32) = 1632.
At this point, j + foo = (2 + 1600) = 1602, not 1632.
In foo[j], j is an index showing which 16-bit address (element of array) should be used.
How can the index j also equal the displacement from the base address?
This section assumes that the size of foo's items is the same size as the memory's addressable cells, so
foo[j] = RAM[1600+j]
The * in this section has nothing to do with multiplication.
This is a case where a picture is worth a thousand words
| Address | Content |
| 1599 | |
foo --> | 1600 | foo[0] |
| 1601 | foo[1] |
| 1602 | foo[2] |
| 1603 | |
--Mark