How i can access a variable data using a variable value in adress like [ var_+[second_byte] ]?
问题 I got this code: BITS 16 data: bytemap: db 0x0, 0x1, 0x4; pixel_x: db 2; to return the 0x4 value main: ; code... mov al, [bytemap+[pixel_x]]; i need that byte in al register ; more code... jmp main; but nasm returns "expression syntax error", i tryed using mov bl, [pixel_x]; mov al, [bytemap+bl] , but don't work, how the right way to do it? ( if it exists )... 回答1: You need to use pointer-width registers in addressing modes . x86 doesn't have memory-indirect addressing modes, only register