NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: georgelappies on April 30, 2012, 05:27:08 PM

Title: operation size not specified error?
Post by: georgelappies 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?
Title: Re: operation size not specified error?
Post by: Frank Kotler 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