home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / 5 / fxn0ah.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  680 b   |  15 lines

  1. kbuf    db      80              ; maximum length of read
  2.         db      0               ; actual length of read
  3.         db      80 dup (0)      ; keyboard input goes here
  4.         .
  5.         .
  6.         .
  7.         mov     dx,seg kbuf     ; set DS:DX = address of
  8.         mov     ds,dx           ; keyboard input buffer
  9.         mov     dx,offset kbuf
  10.         mov     ah,0ah          ; function 0AH = read buffered line
  11.         int     21h             ; transfer to MS-DOS
  12.                                 ; terminated by a carriage return,
  13.                                 ; and kbuf+1 = length of input,
  14.                                 ; not including the carriage return
  15.