home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 256_01 / fun3ah.a < prev    next >
Text File  |  1988-01-08  |  2KB  |  50 lines

  1. ;---------------------------------------------------------------------
  2. ;    ASM88 FILE:     FUN3AH.A     Remove Directory
  3. ;    ----------
  4. ;    WRITTEN:        25/10/87
  5. ;    -------
  6. ;    PURPOSE:        This is one of a series of files which take
  7. ;    -------         advantage of INT 21H functions under MS-DOS.
  8. ;                    In each case the error situation is marked by
  9. ;                    the carry flag being set.   We use the De Smet
  10. ;                    external variable '_carryf' to see whether the
  11. ;                    carry is set on return from the function.
  12. ;                    If so, the error code can be used to obtain
  13. ;                    information about the specific error.
  14. ;
  15. ;    USAGE:          int FUN3AH(name, &_carryf)
  16. ;    -----           char *name;
  17. ;                    char *_carryf;
  18. ;
  19. ;    DEPENDENCIES:           De Smet C V 2.44+
  20. ;    ------------
  21. ;    Copyright 1987 - Cogar Computer Services Pty. Ltd
  22. ;---------------------------------------------------------------------
  23.  
  24. CSEG
  25. PUBLIC FUN3AH_
  26.  
  27. FUN3AH_:
  28.     push    bp    ; normal De Smet C start
  29.     mov    bp,sp    ; point to the stack
  30.     mov    ax,ds    ; and make ES common with DS
  31.     mov    es,ax
  32. ;----------------------------------------------------------------------
  33. ;  The unique programme follows.
  34. ;----------------------------------------------------------------------
  35.     mov    dx,[bp+4]    ; get address of subdirectory name
  36.     mov    ah,3ah    ; the Function No.
  37.     int    21h
  38.     jc    FUN3AH_ERROR
  39.     jmp    FUN3AH_QUIT
  40. FUN3AH_ERROR:
  41.     mov    si,[bp+6]    ; get address of '_carryf' variable
  42.     mov    byte [si],1    ; return with _carryf = 1
  43. ;----------------------------------------------------------------------
  44. ;  Normal programme termination.
  45. ;----------------------------------------------------------------------
  46. FUN3AH_QUIT:
  47.     pop    bp    ; restore starting conditions
  48.     ret
  49. ;----------------------------------------------------------------------
  50.