Author Topic: 1.asm:2: error: invalid effective address  (Read 11896 times)

Offline mcheung63

  • New Member
  • Posts: 1
1.asm:2: error: invalid effective address
« on: May 01, 2018, 06:09:40 PM »
Hi
  Why i got 1.asm:2: error: invalid effective address ?

bits 16
adc byte [dl], 0x12

Thanks
From Peter

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: 1.asm:2: error: invalid effective address
« Reply #1 on: May 01, 2018, 06:41:01 PM »
Hi Peter,
Welcome to the Forum.

Um... because it's not an effective address. Did you mean to write "di" instead of "dl"?

In 16-bit code, only bx and bp can be used as "base" registers and only si and di can be used as index registers. I know you're not that new to this - I suspect you just made a typo...

Best,
Frank