title: Getting string input and displaying input with DOS interrupts MASM
body: <p>In MASM, I created a buffer variable to hold the user string input from keyboard. I am stuck on how to hold the string input into that buffer variable. I don't have any libraries linked like the irvine ones and want to do this with DOS interrupts. So far I have something along the lines of</p>
  
  <pre><code>            .model small
  
              .stack 100h
  
              .data
  buff        db  25 dup(0), 10, 13
  lbuff       EQU ($ - buff)              ; bytes in a string
  
              .code
  main:
              mov ax, @data
              mov ds, ax              
  
              mov ah, 0Ah         ; doesn't work
              mov buff, ah        ; doesn't seem right
              int 21h                 
  
  
              mov     ax, 4000h       ; display to screen
              mov     bx, 1           
              mov     cx, lbuff           
              mov     dx, OFFSET buff     
              int     21h 
  
              mov ah, 4ch
              int 21h
  
              end main
  </code></pre>
  
  <p>I assume using 0Ah is correct as it is for reading array of input of buffered characters.</p>