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 / DoCLICmd.i < prev    next >
Encoding:
Text File  |  1990-11-16  |  992 b   |  27 lines

  1.      NOLIST
  2. DoCLICmd    MACRO              ; 10 Jan 88
  3. *------------------------------; Start of DoCLICmd macro.
  4.      CLR.L D2                  ; Make D2 indicate "execute from command
  5.                                ;  string only".
  6.      NOLIST
  7.      IFEQ NARG-2               ; If the output file handle is specified, then
  8.      LIST
  9.                                ; Make D3 indicate the output file handle.
  10.      MOVE.L \2,D3
  11.      NOLIST
  12.      ENDC
  13.      IFEQ NARG-1               ; If no output file handle is specified, then
  14.      LIST
  15.      CLR.L D3                  ; Clear D3 so that output will go to the
  16.                                ;  current window.
  17.      NOLIST
  18.      ENDC
  19.      LIST
  20.                                ; Make D1 point to the command buffer.
  21.      MOVE.L #\1,D1
  22.      CallLib Execute,dos       ; Call Execute to do the CLI command.
  23.      TST.L D0                  ; Make the zero flag indicate failure.
  24. *------------------------------; End of DoCLICmd macro.
  25.      ENDM
  26.      LIST
  27.