home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1993-02-25 | 713 b | 32 lines |
- '-----------------------------------------------
- ' Execute: how to launch an external program.
- ' By Fran�ois Lionet
- ' AMOS (c) 1990/91 Europress Software
- '-----------------------------------------------
- '
- ' Lets launch AMOS from AMOS. Haha.
- '
- EXEC["RUN >NIL: <NIL: AMOS1.3"]
- Print Param
- '
- Procedure EXEC[C$]
- '
- ' Open a input/output null channel
- A$="NIL:"+Chr$(0)
- Dreg(1)=Varptr(A$) : Dreg(2)=1004
- HAND=Doscall(-30)
- '
- If HAND
- '
- ' Send the command to AmigaDos
- C$=C$+Chr$(0)
- Dreg(1)=Varptr(C$) : Dreg(2)=HAND : Dreg(3)=HAND
- F=Doscall(-222)
- '
- ' Close the channel
- Dreg(1)=HAND
- A=Doscall(-36)
- End If
- '
- ' -1 if ok
- End Proc[F]