home *** CD-ROM | disk | FTP | other *** search
- NOLIST
- DeleteFile MACRO ; 14 Jan 88
- *------------------------------; Start of DeleteFile macro.
- NOLIST
- IFC '\1','I' ; If <PointerToFileName> is specified, then
- LIST
- ; Put <PointerToFileName> in D1.
- MOVE.L #\2,D1
- NOLIST
- ENDC
- IFC '\1','D' ; If <filename> is specified, then
- LIST
- ; Make D1 point to <filename>.
- MOVE.L #\2.str,D1
- NOLIST
- IFND \2.str ; Unless it was previously defined,
- LIST
- SECTION DataSection,DATA ; The ASCII <filename> string goes here.
- \2.str:
- DC.B '\2',0
- CNOP 0,2
- SECTION "",CODE
- NOLIST
- ENDC
- ENDC
- LIST
- CallLib DeleteFile,dos ; Call DeleteFile to delete the file.
- TST.L D0 ; Make the zero flag indicate failure.
- *------------------------------; End of DeleteFile macro.
- ENDM
- LIST
-