1

I'm very new to assembly and emu8086 and can't seem to figure out why this line gives out an error:

mov [ax], dl

while this line works:

mov [di], ch

The error is: "MOV [ax], dl, probably it's an undefined var: [ax]"

Thanks

Fifoernik
  • 9,779
  • 1
  • 21
  • 27
AshChlor
  • 143
  • 1
  • 13
  • 6
    `[ax]` is not a valid effective address. Use `[bx]`, `[bp]`, `[si]` or `[di]`. – Michael Nov 20 '15 at 07:55
  • 1
    It's a limitation of 8086-architecture: See [8086 Instruction Format & Addressing Modes, Page 13](https://dca13d00a675f255e4d75145ccca85da6f5067de.googledrive.com/host/0B3G21MbFQqR7RUxWTWs5a0JJelk/cse/4/Microprocessors%20&%20Microcontrollers/3.8086Addressnew.pdf) `3. For indirect addressing, the 8086 can only use the BX, BP, SI and DI registers.` ] – zx485 Nov 20 '15 at 08:00

0 Answers0