home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / NFSRC305.ZIP / ASM / CHDIR.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-05-01  |  1.8 KB  |  71 lines

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