title: Loading a string into a local variable dynamically
body: <p>Suppose, I've created a local variable in stack or rather allocated memory for a string and now I want to put a value in it.</p>
  
  <pre><code>push ebp
  mov ebp, esp
  sub esp, 0xff ; 255 bytes
  </code></pre>
  
  <p>And storing strings in the stack in C:</p>
  
  <pre><code>strcat(my_str1, "something1");
  strcat(my_str1, get_var2());
  strcat(my_str1, "something3");
  strcat(my_str1, get_var4());
  </code></pre>
  
  <p>I want to undertand how to do that without "strcat" in FASM or NASM:</p>
  
  <pre><code>;1
  mov byte ptr [esp - 1], 's'
  mov byte ptr [esp - 2], 'o'
  mov byte ptr [esp - 3], 'm'
  mov byte ptr [esp - 4], 'e'
  ; and so on
  </code></pre>
  
  <p>Is this how it's done? And about the part with "get_var2()" and "get_var4()"?</p>
  
  <pre><code>;2
  call get_var2
  mov ??byte?? ptr [esp - 11], eax
  ; or lea?
  </code></pre>