title: assembly language help finding agrv[1][0]
body: <p>I'm trying to get the first element of what is stored in <code>argv[1]</code> in x86 assembly language. 
  I have popped the stack twice to <code>eax</code>  initially because I want <code>argc</code> so I can count the number of <code>argc</code>. Then popped <code>argv</code> to <code>ebx</code>. Im thinking of putting <code>[ebx]</code> into <code>bl</code>. From here I am lost. I have little or no experience in assembly, I am just looking to understand it.</p>
  
  <pre><code>main:
  ;
      mov ecx, 0 ;count output characters
      pop eax ;reject this 32 bits
      pop eax ;get argc
      ;
      pop ebx ; get argv
      ;mov bl, [ebx]
      ;
      add al, 30H ;convert integer to ascii
      mov edi, cline ;put char in output buffer
      mov byte [edi],al
      ;inc edi
      ;mov [edi], bl
      inc ecx ;increment output char count
      inc edi ;increment pointer to o/p buffer
      mov al, 0aH ;LF to end line
      mov byte[edi],al ;put it at end of output line
      inc ecx ;increment output char count
      push ecx ;save char count on stack
      mov edx,len ;length of string to write
      mov ecx,msg ;addr of string
      mov ebx,1 ;file descriptor 1 = stdout
      mov eax,4 ;"write" system call
      int 0x80 ;call the kernel
  ;
      pop edx ;restore char count into edx for system call
      mov ecx,cline ;address of string
      mov ebx,1 ;file descriptor 1 = stdout
  </code></pre>