Function 3Fh (63)        Read from File or Device, Using a Handle
 
    Read bytes from a file or device into a buffer.
 
       On entry:      AH         3Fh
                      BX         File handle
                      CX         Number of bytes to read
                      DS:DX      Address of buffer
 
       Returns:       AX         Number of bytes read, or
                                 Error code, if CF is set
 
       Error codes:   5          Access denied
                      6          Invalid handle
 
                      Call Function 59h for extended error code information
                      (DOS 3.0 and above).
 
       Network:       Requires Read access rights
 
  --------------------------------------------------------------------------
 
    This function reads data from the file or device whose handle is in
    BX. Data is read starting at the location pointed to by the file
    pointer. The file pointer is incremented by the number of bytes read.
 
       Notes:         If the Carry Flag is not set and AX = 0, the file
                      pointer was at the end of the file when the function
                      was called.
 
                      If the Carry Flag is not set and AX is less than the
                      number of bytes requested, either the function read
                      to the end of the file, or an error occurred.
 
                      You can read bytes from anywhere in the file by
                      calling function 42h to move to file poniter before
                      reading data.
 
                      If the keyboard device is specified, this function
                      reads either the specified number of bytes, or all
                      bytes up to the next carriage return, whichever is
                      less. (If the number of bytes specified is at least
                      two larger than the number of characters typed, the
                      carriage-return line-feed pair will be returned as
                      the last two bytes, and will count as two bytes.)

Seealso:



This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster