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

  1. kbuf    db      80 dup (0)      ; buffer for keyboard input
  2.         .
  3.         .
  4.         .
  5.         mov     dx,seg kbuf     ; set DS:DX = address of
  6.         mov     ds,dx           ; keyboard input buffer
  7.         mov     dx,offset kbuf
  8.         mov     cx,80           ; CX = maximum length of input
  9.         mov     bx,0            ; standard input handle = 0
  10.         mov     ah,3fh          ; function 3FH = read file/device
  11.         int     21h             ; transfer to MS-DOS
  12.         jc      error           ; jump if function failed
  13.                                 ; otherwise AX = actual
  14.                                 ; length of keyboard input,
  15.                                 ; including carriage-return and
  16.                                 ; linefeed, and the data is
  17.                                 ; in the buffer 'kbuf'
  18.