title: Working with arrays assembler 8086
body: <p>Define an array with ten 16-bit words. Read the values of a string containing any characters from the keyboard. Afterwards, the string should be transformed, so that it should remain only elements that are lowercase letters (<code>a</code> - <code>z</code>).<br>
  Then, print the string out on the screen and store in the register <code>CX</code> the number of elements of the modified sequence.</p>
  
  <p>This is my code:</p>
  
  <pre><code>data segment
  array dw 10 dup (?) 
  i db ?
  ends
  
  stack segment
  dw   128  dup(0)
  ends
  
  code segment
  
  start:
  
  mov i, 0d    
  mov bx, 0h
  insert: ;inserting elements in array work only for db, but i need to work for dw
  mov ah, 01h
  int 21h 
  mov array [bx], al
  inc bx
  inc i
  cmp i,4d
  JNE insert
  
  mov bx, 0h
  mov cl, i
  go:  ; loop for finding numbers or same character who are not lowercase letters, deleting,
           ; and moving lowercase letters on their positions  
  mov ax, array[bx]
  cmp ax, 97d
  jl notchar
  cmp ax, 97d
  jg notchar
  
  loop go
  
  mov ax, 4c00h
  int 21h  
  
  ends
  
  end start
  </code></pre>
  
  <p>My problem is, it doesn't work correctly with <code>dw</code>. Can anybody help me?</p>