I'm trying to increment 1 to a variable in IA32 Assembly in Linux
section .data
num:    dd  0x1
section .text
global _start
_start:
   add    dword [num], 1
   mov    edx, 1
   mov    ecx, [num]
   mov    ebx,1
   mov    eax,4
   int    0x80
   mov    eax,1
   int    0x80
Not sure if it's possible to do.
In another literature I saw the follow code:
mov eax, num
inc eax
mov num, eax
Is it possible to increment a value to a var without moving to a register?
If so, do I have any advantage moving the value to a register?
 
     
    