     NOLIST
DoCLICmd    MACRO              ; 10 Jan 88
*------------------------------; Start of DoCLICmd macro.
     CLR.L D2                  ; Make D2 indicate "execute from command
                               ;  string only".
     NOLIST
     IFEQ NARG-2               ; If the output file handle is specified, then
     LIST
                               ; Make D3 indicate the output file handle.
     MOVE.L \2,D3
     NOLIST
     ENDC
     IFEQ NARG-1               ; If no output file handle is specified, then
     LIST
     CLR.L D3                  ; Clear D3 so that output will go to the
                               ;  current window.
     NOLIST
     ENDC
     LIST
                               ; Make D1 point to the command buffer.
     MOVE.L #\1,D1
     CallLib Execute,dos       ; Call Execute to do the CLI command.
     TST.L D0                  ; Make the zero flag indicate failure.
*------------------------------; End of DoCLICmd macro.
     ENDM
     LIST
