NASM Coding: Numeric Operand Formats

We can also use numbers to index into RAM as follows:

[750]                  ; offset
[rbp]                  ; base register
[rcx + rsi*4]          ; base + index * scale
[rbp + rdx]            ; scale is 1
[rbx - 8]              ; offset is -8
[rax + rdi*8 + 500]    ; all four components
[rbx + counter]        ; offset is the address of the variable 'counter'

Example:

mov rbx, [rbp] ; rbx = RAM[rbp]