home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / assembler / thesource / volume2 / source / system / asmmacros.lha / DeleteFile.i < prev    next >
Encoding:
Text File  |  1990-11-16  |  960 b   |  32 lines

  1.      NOLIST
  2. DeleteFile     MACRO           ; 14 Jan 88
  3. *------------------------------; Start of DeleteFile macro.
  4.      NOLIST
  5.      IFC '\1','I'              ; If <PointerToFileName> is specified, then
  6.      LIST
  7.                                ; Put <PointerToFileName> in D1.
  8.      MOVE.L #\2,D1
  9.      NOLIST
  10.      ENDC
  11.      IFC '\1','D'              ; If <filename> is specified, then
  12.      LIST
  13.                                ; Make D1 point to <filename>.
  14.      MOVE.L #\2.str,D1
  15.      NOLIST
  16.      IFND \2.str               ; Unless it was previously defined,
  17.      LIST
  18.      SECTION DataSection,DATA  ; The ASCII <filename> string goes here.
  19. \2.str:
  20.      DC.B '\2',0
  21.      CNOP 0,2
  22.      SECTION   "",CODE
  23.      NOLIST
  24.      ENDC
  25.      ENDC
  26.      LIST
  27.      CallLib DeleteFile,dos    ; Call DeleteFile to delete the file.
  28.      TST.L D0                  ; Make the zero flag indicate failure.
  29. *------------------------------; End of DeleteFile macro.
  30.      ENDM
  31.      LIST
  32.