Addressing Modes in Assembly Language (IA-32 NASM)

后端 未结 2 1906
臣服心动
臣服心动 2020-12-01 11:15

As the web-resources on this is sparse, I will, for the benefit of future searches, begin by listing the address modes for IA-32 Assembly Language (NASM) and then follow up

2条回答
  •  臣服心动
    2020-12-01 12:02

    That tutorial is not even valid NASM code. For links to x86 guides / resources / manuals that don't suck, see the x86 tag wiki here on SO.

    MOV [EBX], 110 won't assemble because neither operand implies an operand-size. (I think even MASM won't assemble it, but some bad assemblers like emu8086 have a default operand size for instructions like this.) mov word [ebx], 110 would do a 16-bit store.

    MOV EBX, [MY_TABLE] will assemble but it loads the first 2 words from the table. mov ebx, MY_TABLE will put the address into a register.

提交回复
热议问题