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

  1. ; File......: RMDIR.ASM
  2. ; Author....: Ted Means
  3. ; CIS ID....: 73067,3332
  4. ;
  5. ; This function 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:12   GLENN
  12. ;  Forest Belt proofread/edited/cleaned up doc
  13. ;
  14. ;     Rev 1.1   14 Jun 1991 19:54:58   GLENN
  15. ;  Minor edit to file header
  16. ;
  17. ;     Rev 1.0   01 Apr 1991 01:03:52   GLENN
  18. ;  Nanforum Toolkit
  19. ;
  20. ;
  21.  
  22.  
  23. ;  $DOC$
  24. ;  $FUNCNAME$
  25. ;      FT_RMDIR()
  26. ;  $CATEGORY$
  27. ;      DOS/BIOS
  28. ;  $ONELINER$
  29. ;      Delete a subdirectory
  30. ;  $SYNTAX$
  31. ;      FT_RMDIR( <cDirName> ) -> nResult
  32. ;  $ARGUMENTS$
  33. ;      <cDirName> is the name of the directory to delete.
  34. ;  $RETURNS$
  35. ;       0  if successful
  36. ;       3  if Path Not Found
  37. ;       5  if Access Denied (directory not empty)
  38. ;      16  if attempt to delete current directory.
  39. ;      99  if invalid parameters passed
  40. ;  $DESCRIPTION$
  41. ;     This function is useful if you need to remove a subdirectory for
  42. ;     some reason.
  43. ;
  44. ;     The source code is written to adhere to Turbo Assembler's IDEAL mode.
  45. ;     To use another assembler, you will need to rearrange the PROC and
  46. ;     SEGMENT directives, and also the ENDP and ENDS directives (a very
  47. ;     minor task).
  48. ;  $EXAMPLES$
  49. ;     FT_RMDIR( "C:\CLIPPER" )
  50. ;     FT_RMDIR( "\EXAMPLE" )
  51. ;     FT_RMDIR( "..\SOURCE" )
  52. ;  $END$
  53. ;
  54.  
  55. IDEAL
  56.  
  57. Public   FT_RMDIR
  58.  
  59. Extrn    __ftdir:Far
  60.  
  61. Segment  _NanFor   Word      Public    "CODE"
  62.          Assume    CS:_NanFor
  63.  
  64. Proc     FT_RMDIR  Far
  65.  
  66.          Mov       AH,3Ah                    ; DOS service--remove directory
  67.          Push      AX                        ; Save on stack
  68.          Call      __ftdir                   ; Call generic directory routine
  69.          Add       SP,2                      ; Realign stack
  70.          Ret
  71. Endp     FT_RMDIR
  72. Ends     _NanFor
  73. End
  74.