title: Assembly: How to print offset values
body: <p>I am trying to print out the offset values.
  (Is the term "print" correct? Is there another term for it?</p>
  
  <p>Is the code correct? I am rather confused with documentation for assembly.</p>
  
  <pre><code>print_offsets:  mov  SI,0
                  mov  CX,30
                  mov  AH,2
                  int  21h
                  jmp  offsloop
  
  offsloop:       cmp  0,Array[SI]
                  ja   print_offset ;if the array element is nonzero
                  inc  SI
                  dec  CX
                  jnz  offsloop
  
  print_offset:   mov DL,SI
                  mov  AH,2
                  int  21h
  </code></pre>