title: Which variable size to use (db, dw, dd) with x86 assembly?
body: <p>I am a beginner to assembly and I don't know what all the db, dw, dd, things mean.
  I have tried to write this little script that does 1+1, stores it in a variable and then displays the result. Here is my code so far:</p>
  
  <pre><code>.386
  .model flat, stdcall 
  option casemap :none
  include \masm32\include\windows.inc
  include \masm32\include\kernel32.inc
  include \masm32\include\masm32.inc
  includelib \masm32\lib\kernel32.lib
  includelib \masm32\lib\masm32.lib
  .data
  num db ? ; set variable . Here is where I don't know what data type to use.
  .code
  start:
  mov eax, 1               ; add 1 to eax register
  mov ebx, 1               ; add 1 to ebx register
  add eax, ebx             ; add registers eax and ebx
  push eax                 ; push eax into the stack
  pop num                  ; pop eax into the variable num (when I tried it, it gave me an error, i think  thats because of the data type)
  invoke StdOut, addr num  ; display num on the console.
  invoke ExitProcess       ; exit
  end start
  </code></pre>
  
  <p>I need to understand what the db, dw, dd things mean and how they affect variable setting and combining and that sort of thing.</p>
  
  <p>Thanks in advance,
  Progrmr </p>