home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn39h.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  1.1 KB  |  23 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;              Function 39H: Create Directory                ;
  4.         ;                                                            ;
  5.         ;              int make_dir(pdirpath)                        ;
  6.         ;                  char *pdirpath;                           ;
  7.         ;                                                            ;
  8.         ;              Returns 0 if directory created OK,            ;
  9.         ;              otherwise returns error code.                 ;
  10.         ;                                                            ;
  11.         ;************************************************************;
  12.  
  13. cProc   make_dir,PUBLIC,ds
  14. parmDP  pdirpath
  15. cBegin
  16.         loadDP  ds,dx,pdirpath  ; Get pointer to pathname.
  17.         mov     ah,39h          ; Set function code.
  18.         int     21h             ; Ask MS-DOS to make new subdirectory.
  19.         jb      md_err          ; Branch on error.
  20.         xor     ax,ax           ; Else return 0.
  21. md_err:
  22. cEnd
  23.