NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: assistech on May 07, 2020, 02:37:45 PM

Title: Store the sum
Post by: assistech on May 07, 2020, 02:37:45 PM
Hi, i would like to store in a variable the sum of an operation, by "mov sum,eax", but i have this response:" Invalid combination of opcode and operands"


Title: Re: Store the sum
Post by: Frank Kotler on May 07, 2020, 08:33:49 PM
Code: [Select]
mov [sum], eax

Without the square brackets, it's the address of your variable. With the square brackets, the "[contents]" of your variable.

Best,
Frank