mov r8, [label]
mov [ imm + reg * imm + imm]
- In general, remember when accessing an array the formula is
- A[i] = baseadd + i * size_of(element) + offset into element
- These are in byte addresses, not bits.
- Think of an array of structures (classes)
-
struct MyDataT {
short value;
char letter;
};
MyDataT ary[3];
- The base address will be the entire record
- The offset for the first field will be 0 bytes
- The offset for the second field will be 2 bytes (endiness)
- And one byte will be padding.
- ary.asm is a simple array
- ary2.asm is the array of structures from above.