I have some code like so (emu8086)
data segment
str1 db "hello"
len dw 4h
data ends
code segment
...
...
mov si, offset str1
lea di, [si + len]
code ends
I would expect this to make di
point to the address of DS:0004, however the actual instruction generated is LEA DI, [SI] + 021h
.
If instead, I use:
lea di, [si + 4]
Then it works as expected.
How do I make the first version work in a similar way to the second?