title: scanf string in assembly
body: <p>I'm trying to scan 100-sized string in assembly and to print it, using scanf and printf.</p>
  
  <pre><code>        .data
  strString:  .string "%s"
  stringToRev:    .space  100
  .text   #the beginning of the code
  .globl  main    #the label "main" is used to state the initial point of this program
  
      .type   main, @function # the label "main" representing the beginning of a function
  main:   # the main function:
      pushl   %ebp    #save the old frame pointer
      movl    %esp,   %ebp    #create the new frame pointer
      pushl   %ebx    #saving a callee save register.
  
  leal -12(%ebp), %edx        #choice will be saved in edx
      pushl %edx
      pushl $strString    
      call scanf
      movl  (%edx), $stringToRev
  
      pushl   -12(%ebp)
      pushl   $strString
      call    printf
      call    Reverse
  
      pushl   %eax
      pushl   $strString
      call    printf
  </code></pre>
  
  <p>If I enter a string, for example "asfdg", it prints 0 (instead of this string).
  I feel desperate about it- there is no answers for assembly in web!</p>