title: (MASM32) How would I create a macro to obtain a string from user input?
body: <p>I am still pretty new to Assembly and currently taking an introductory class at my local community college.</p>
  
  <p>One of the requirements for our assignments was to use macros to print text and take in user input.</p>
  
  <p>I am pretty sure my printing code is right:</p>
  
  <pre><code>displayString MACRO message:REQ
    lea  eax, message
    push eax
    call printf    
    add esp, 4
  ENDM
  </code></pre>
  
  <p>I am confused though on how I would go about getting the user input. Here is what I have so far:</p>
  
  <pre><code>obtainString MACRO input:REQ, msgformat:REQ
    lea eax, input
    push eax
    lea eax, msgformat
    push eax
    call scanf
    add esp, 8
  ENDM
  </code></pre>
  
  <p>Because the macro is a separate file, I am pretty sure the variables do not transfer to my main file. I am just wondering how would I transfer the contents of 'input' from the macros file to a variable in my main file.
  Thank you.</p>
  
  <p>Side note: For some reason my project will not compile because it cannot find the macros file although it is in the same folder as the main file.</p>