title: moving an array element to a register assembly
body: <p>My assignment is to find the smallest letter in the array using assembly embedded into C. I am not sure how to access each element of the array. I tried googling and I found out that some people are doing the following:</p>
  
  <p>mov ecx, arrayOfLetters</p>
  
  <p>and then increment ecx to access each element. Is that right or what I wrote so is correct?</p>
  
  <p>please help, I am confused. </p>
  
  <pre><code>    char findMinLetter( char arrayOfLetters[], int arraySize )
  {
      char min;
  
      __asm{
          push eax
          push ebx
          push ecx
          push edx
          mov dl, 0x7f        // initialize DL
  
  
          xor ebx, ebx //EBX started off as 0
  
          //moves letters from array to registers
          mov ecx, arrayOfLetters[ebx]
          mov edx, arrayOfLetters[ebx+1]
  </code></pre>