Author Topic: Store the sum  (Read 5221 times)

Offline assistech

  • Jr. Member
  • *
  • Posts: 27
Store the sum
« 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"



Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Store the sum
« Reply #1 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