WCU / Cybersecurity
~/CSC 471/Class 02/KP 08
Class 02 · KP 08 / 23

Memory Addressing: [base + index*scale + disp]

The full effective-address form the CPU can compute in one operand:

mov  eax, [rbx + rcx*4 + 8]
;          |     |      |
;        base  index   displacement
;              *scale (1,2,4,8)
  • base: starting address (e.g. array pointer).
  • index * scale: element offset; scale = element size.
  • disp: constant offset (e.g. struct field).
  • Example maps directly to C: arr[i] where each int is 4 bytes, arr in rbx, i in rcx.