Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Thanks for your answer. I was able to solve the first error, easily, but the second one confuses me. After a few experiments, I found out that mov ax, [bx] is absolutely correct, but mov ax, [dx] gives an invalid effective address error. Why? Aren't dx and bx equal? Commented Sep 29, 2014 at 18:52
  • It's been a long time since I coded in 16-bit land, but I seem to recall that not all registers can be used for indexing in that mode. You might want to try si rather than dx. Commented Sep 29, 2014 at 19:05
  • @golergka In 16-bit mode addresses are of form [displacement + bx|bp + si|di]. You can only use bx or bp for base and si or di for index. Commented Sep 30, 2014 at 5:38