-
In NASM syntax, that instruction should be
MOV EBX, MY_TABLE
. WhatMOV EBX, [MY_TABLE]
would do is load the first 4 bytes located atMY_TABLE
intoEBX
. Another alternative would be to useLEA
, as inLEA EBX, [MY_TABLE]
. -
In this case the tutorial is right.
MY_TABLE
is defined as an array of words. A word on the x86 is 2 bytes, so the second element ofMY_TABLE
is indeed located atMY_TABLE + 2
.