NASM - The Netwide Assembler
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Calendar
Login
Register
NASM - The Netwide Assembler
»
NASM Forum
»
Programming with NASM
»
Store the sum
« previous
next »
Print
Pages: [
1
]
Author
Topic: Store the sum (Read 8597 times)
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"
Logged
Frank Kotler
NASM Developer
Hero Member
Posts: 2667
Country:
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
Logged
Print
Pages: [
1
]
« previous
next »
NASM - The Netwide Assembler
»
NASM Forum
»
Programming with NASM
»
Store the sum