Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <b>function 47h (71) get current directory</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 47h (71)        Get Current Directory

    Reports the full pathname of the current directory.

       On entry:      AH         47h
                      DL         Drive number (0=default, 1=A, etc.)
                      DS:SI      Pointer to a 64-byte buffer

       Returns:       AX         Error code, if CF is set

       Error codes:   15         Invalid drive specified

                      Call Function 59h for extended error code information
                      (DOS 3.0 and above).

  --------------------------------------------------------------------------

    This function returns the full pathname of the current directory,
    excluding the drive designator and initial backslash character, as an
    ASCIIZ string at the memory buffer pointed to by DS:SI.

       Notes:         The pathname may be as long as 63 bytes (without the
                      initial backslash), plus the terminating zero byte.
                      If the current directory is the root, the function
                      returns a null ASCIIZ string (that is, the first
                      byte of the buffer will be zero).

                      In some versions of DOS prior to 3.0, the pathname
                      can contain members that are longer than the 12-
                      character limit for file names.  For example, this
                      function under DOS 2.0 returns
                      "directoryname\subdir" if the directory path
                      "\director\subdir" exists and the user typed
                      "cd \directoryname\subdir".  Note that this path is
                      in lower case and contains too many characters.  DOS
                      3.0 and above always return a correct path name in
                      upper case -- "DIRECTOR\SUBDIR" in this case.

See Also: 39h 3Ah 3Bh 59h

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson