home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / nfsrc21.zip / CHDIR.ASM < prev    next >
Assembly Source File  |  1991-08-16  |  2KB  |  77 lines

  1. ; File......: CHDIR.ASM
  2. ; Author....: Ted Means
  3. ; Date......: $Date:   15 Aug 1991 23:07:20  $
  4. ; Revision..: $Revision:   1.2  $
  5. ; Log file..: $Logfile:   E:/nanfor/src/chdir.asv  $
  6. ; This is an original work by Ted Means and is placed in the
  7. ; public domain.
  8. ;
  9. ; Modification history:
  10. ; ---------------------
  11. ;
  12. ; $Log:   E:/nanfor/src/chdir.asv  $
  13. ;  
  14. ;     Rev 1.2   15 Aug 1991 23:07:20   GLENN
  15. ;  Forest Belt proofread/edited/cleaned up doc
  16. ;  
  17. ;     Rev 1.1   14 Jun 1991 19:54:20   GLENN
  18. ;  Minor edit to file header
  19. ;  
  20. ;     Rev 1.0   01 Apr 1991 01:03:10   GLENN
  21. ;  Nanforum Toolkit
  22. ;  
  23. ;
  24.  
  25.  
  26. ;  $DOC$
  27. ;  $FUNCNAME$
  28. ;     FT_CHDIR()
  29. ;  $CATEGORY$
  30. ;     DOS/BIOS
  31. ;  $ONELINER$
  32. ;     Change the current directory
  33. ;  $SYNTAX$
  34. ;     FT_CHDIR( <cDirName> ) -> nResult
  35. ;  $ARGUMENTS$
  36. ;     <cDirName> is the name of the desired directory.
  37. ;  $RETURNS$
  38. ;     0  if successful
  39. ;     3  if path not found
  40. ;     99 if invalid parameters passed
  41. ;  $DESCRIPTION$
  42. ;     Use this function if you prefer to change the active directory
  43. ;     instead of relying on the SET PATH command.
  44. ;
  45. ;     The source code is written to adhere to Turbo Assembler's IDEAL mode.
  46. ;     To use another assembler, you will need to rearrange the PROC and
  47. ;     SEGMENT directives, and also the ENDP and ENDS directives (a very
  48. ;     minor task).
  49. ;  $EXAMPLES$
  50. ;     FT_CHDIR( "C:\CLIPPER" )
  51. ;     FT_CHDIR( "\" )
  52. ;     FT_CHDIR( "..\SOURCE" )
  53. ;  $END$
  54. ;
  55.  
  56.          IDEAL
  57.  
  58. Public   FT_CHDIR
  59.  
  60. Extrn    __ftdir:Far
  61.  
  62. Segment  _NanFor   Word      Public    "CODE"
  63.          Assume    CS:_NanFor
  64.  
  65. Proc     FT_CHDIR  Far
  66.  
  67.          Mov       AH,3Bh                    ; DOS service -- change directory
  68.          Push      AX                        ; Save on stack
  69.          Call      __ftdir                   ; Call generic directory routine
  70.          Add       SP,2                      ; Realign stack
  71.          Ret
  72. Endp     FT_CHDIR
  73. Ends     _NanFor
  74. End
  75. 
  76.