home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / sclib1.lbr / UNLINK.MZC / UNLINK.MAC
Encoding:
Text File  |  1993-10-25  |  512 b   |  31 lines

  1. ;
  2. ;    unlink(name)
  3. ;
  4. UNLINK::
  5. DELETE::
  6.     POP    B
  7.     POP    D
  8.     PUSH    D
  9.     PUSH    B
  10.     PUSH    D    ; name        ; /* open file to unlink in
  11.     LXI    H,"r"    ; Mode        ;    order to get fcb for it. */
  12.     PUSH    H
  13.     CALL    FOPEN            ; unit = fopen(name,'r');
  14.     POP    D
  15.     POP    D
  16.     SHLD    UNIT
  17.     MVI    C,19            ; bdos(19,unit);
  18.     CALL    BDOS            ; (mod to cbdos(fas))
  19.     LHLD    UNIT            ; freeio(unit);
  20.     PUSH    H
  21.     CALL    FREEIO
  22.     POP    D
  23.     RET                ; return;
  24.  
  25. UNIT:    DS 2
  26.  
  27.     EXTRN    BDOS
  28.     EXTRN    FOPEN
  29.     EXTRN    FREEIO
  30.     END
  31. ;