title: NASM: Adding two numbers stored in memory
body: <p>So, I have a more complex question to solve overall, but currently I'm unable to add two numbers. I know about the 'add' command. It works great when you're just adding an integer to an register-assigned value. When it comes to adding two numbers from the memory, they're initially strings, which requires converting to integers before (that's my guess). Any help?</p>
  
  <pre><code>SECTION .data
      msg1    db  'Enter 2 numbers:', 0Ah
      msg2    db  'You entered:', 0Ah
      msg3    db  'Sum: '
  
  SECTION .bss
  one:    resb    4
  two:    resb    4
  sum:    resb    4
  
  
  SECTION .text
  global _start
  
  _start:
  
  mov eax, 4
  mov ebx, 1
  mov ecx, msg1
  mov edx, 32
  int 80h
  
  mov eax, 3
  mov ebx, 0
  mov ecx, one
  mov edx, 4
  int 80h
  
  mov eax, 3  
  mov ebx, 0
  mov ecx, two
  mov edx, 4
  int 80h
  
  mov eax, 4
  mov ebx, 1
  mov ecx, msg2
  mov edx, 39
  int 80h
  
  mov eax, 4
  mov ebx, 1
  mov ecx, one
  mov edx, 4
  int 80h
  
  mov eax, 4
  mov ebx, 1
  mov ecx, two
  mov edx, 4
  int 80h
  
  mov eax, 4
  mov ebx, 1
  mov ecx, sum
  mov edx, 4
  int 80h
  
  mov eax, 1
  mov ebx, 0
  int 80h
  </code></pre>