Given the following code:
L1 db "word", 0
mov al, [L1]
mov eax, L1
What do the brackets in [L1] represent?
This question is specifically about NASM. The other major flavour of Intel-syntax assembly is MASM style, where brackets work differently when there’s no register involved:
See Confusing brackets in MASM32
[L1]means the memory contents at address L1. After runningmov al, [L1]here, Thealregister will receive the byte at address L1 (the letter ‘w’).