1

Can somebody explain what

mov byte [es:eax], dl

would mean in NASM x86 assembler?

Specifically the [es:eax] part.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
badpanda
  • 2,446
  • 5
  • 34
  • 45

1 Answers1

2

The syntax of [es:eax] indicates an indirect move in which es:eax register combination contains an address and the byte stored in register dl will be stored at that address.

es is a segment register and eax is a general purpose register used in the address calculation. I assume this is a 16 bit address model so the combination of the segment register and the eax register provides the complete 32 bit address for a far pointer.

See this web page on basic instructions and addressing.

And this web page on effective addresses as well as this one on addresses.

Richard Chambers
  • 16,643
  • 4
  • 81
  • 106