Author Topic: operation size not specified error?  (Read 22544 times)

Offline georgelappies

  • Jr. Member
  • *
  • Posts: 12
operation size not specified error?
« on: April 30, 2012, 05:27:08 PM »
Hi all, why when I declare a label as a word and initialize it as 0 do I still have to give the size of the label when wanting to use it?

See the code below:
Code: [Select]
label:    dw 0                        ; declare a word sized label and init it 0
               inc word [label]    ; have to put word else nasm complains?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: operation size not specified error?
« Reply #1 on: April 30, 2012, 06:48:17 PM »
Yes. Nasm has "amnesia" and will not "remember" that you said "label" was "dw"... unlike some other assemblers.

See:
http://forum.nasm.us/index.php?topic=1360.0
for more discussion...

Best,
Frank