title: assembly language function 2 looping
body: <p>I am trying to figure out how to loop through a string one character at time, using my cursor.<br> The program that I made was able to grab a certain index in in the string.<br>However, how can I loop through the entire string one character at a time?</p>
  
  <pre><code>title Hello World Program (hello3.asm)
  
  ;
  ; This is the sample program on page 572 of your text with little modification
  ;It utilizes Dos service 40h.
  ;
  
  .model small
  .data
      message db "Hello, Dos Here!",0dh,0ah,'$'
  
  
  .code
  main proc
      mov ax, @data
      mov ds, ax
      mov cx, 5
  L1:
      mov ah, 2
      mov dl, message
      int 21h
  
  loop L1
      mov ax, 4c00h
      int 21h
  main endp
  end 
  </code></pre>
  
  <p>`</p>