title: I don't understand how to use Interrupt 21, AH=0ah
body: <p>My information is coming from <a href="http://www.ctyme.com/intr/rb-2563.htm" rel="noreferrer">here</a>. The assignment asks for a program that reads in no more than 20 characters, converts those characters to upper case, and then prints the input as capitals. </p>
  
  <p>I have no idea how to access the input from int21/AH=0ah. I really can't ask a more precise question unless I understand what is linked above. Can someone explain? Also, I'm using TASM if that makes any difference. Also, I'm testing this on freedos.</p>
  
  <p><strong>UPDATE1:</strong></p>
  
  <p>Alright, thanks to your help, I believe I understand how the interrupt needs to be set up and behaves.</p>
  
  <p><strong>Setup:</strong>
  I have to designate a ds:dx where I want this buffer to exist</p>
  
  <p>I have to set ds:dx to 20 (which sets the max number of characters the buffer can hold)</p>
  
  <p>I have to set ds:dx+1 to 0 (which I think somehow set a min number of characters to read in)</p>
  
  <p>Actually call int21/AH=0ah, which will go to ds:dx and interpret the preset bytes. It will halt the program while it waits for input</p>
  
  <p>int21/AH=0ah will fill from ds:dx+2+n with my input (where n is the number of characters input including '\r')</p>
  
  <p>My question is now, how do I do this. I've just looked through the x86 Assembly Language Reference again, but haven't been able to find anything helpful yet.</p>
  
  <p>Code I've got so far</p>
  
  <pre><code>           assume          cs:code,ds:code
  code       segment
  start:
  
             mov  ax,code ;moves code segment into reg AX
             mov  ds,ax   ;makes ds point to code segment
  
             mov  ah,0ah
             int  21h
             mov  ax,1234h  ;breakpoint
  
             mov  ah,9
             mov  dx,offset message
             int  21h
  
  endNow:
             ;;;;;;;;;;ends program;;;;;;;;;;
             mov  ah,0  ;terminate program
             int  21h   ;program ends
  
  message    db   'Hello world!!!',13,10,'$'
  code       ends
             end  start
  </code></pre>