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 / Execute.i < prev    next >
Encoding:
Text File  |  1990-11-16  |  1.0 KB  |  34 lines

  1.      NOLIST
  2. Execute     MACRO              ; 10 Jan 88
  3. *------------------------------; Start of Execute macro.
  4.      MOVE.L #NullString,D1     ; Make D1 point to a null command string.
  5.      NOLIST
  6.      IFND NullString
  7.      LIST
  8.      SECTION DataSection,DATA
  9. NullString:
  10.      DC.B 0,0
  11.      SECTION   "",CODE
  12.      NOLIST
  13.      ENDC
  14.      IFEQ NARG-2               ; If the output file handle is specified, then
  15.      LIST
  16.                                ; Make D3 indicate the output file handle.
  17.      MOVE.L \2,D3
  18.      NOLIST
  19.      ENDC
  20.      IFEQ NARG-1               ; If no output file handle is specified, then
  21.      LIST
  22.      CLR.L D3                  ; Clear D3 so that output will go to the
  23.                                ;  current window.
  24.      NOLIST
  25.      ENDC
  26.      LIST
  27.                                ; Put the command file handle in D2.
  28.      MOVE.L \1,D2
  29.      CallLib Execute,dos       ; Call Execute.
  30.      TST.L D0                  ; Make the zero flag indicate failure.
  31. *------------------------------; End of Execute macro.
  32.      ENDM
  33.      LIST
  34.