title: Pattern in assembly language
body: <pre><code>.model small
  .stack 100h
  .Data 
   count word 0
  .code
   main proc
  
     mov cx,5
    mov al,40h
     mov ah,2
    mov bx,0
  
  
  first :
      mov count,cx
  
     inc bx
     inc al
     mov cx,bx
  
  
  second :
      mov dl,al
      int 21h 
  
  
  
     loop second
     mov cx ,count
      mov dx,13
      mov ah,2
      int 21h 
       mov dl,10
       mov ah,2
       int 21h
       loop first
      mov ax,4c00h
      int 21h
  
    main endp
    end main
  </code></pre>
  
  <p>I wrote this code and expecting output like this</p>
  
  <p>A<br>
  BB<br>
  CCC<br>
  DDDD<br>
  EEEEE  </p>
  
  <p>but getting this output</p>
  
  <p>A<br>
  00<br>
  000<br>
  0000<br>
  00000  </p>
  
  <p>can anyone sort out the problem in this code
  when i remove the line of codes for line change it is giving output</p>
  
  <p>ABBCCCDDDDEEEE</p>