lodsw
is equivalent (if omitting flags) to
mov ax, word [si]
add si, 2
I am not sure you can use dx
in an address expression like [si+dx]
(in 16-bit mode, only si
, di
, bp
and bx
are index registers). If you don't want to change si
, use bx
.
(By the way: do you really want to write 16-bit code? It's quite outdated. NASM compiles 32-bit code perfectly.)