home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / misc / amoner04.dms / amoner04.adf / ReBoot.AMOS / ReBoot.amosSourceCode
Encoding:
AMOS Source Code  |  1992-06-17  |  684 b   |  31 lines

  1. '-----------------------------------------------   
  2. ' Execute: how to launch an external program.
  3. ' By Fran∩┐╜ois Lionet 
  4. ' AMOS (c) 1990/91 Europress Software
  5. '----------------------------------------------- 
  6. '
  7. ' Lets launch AMOS from AMOS. Haha.
  8. '
  9. EXEC["c:boot"]
  10. '
  11. Procedure EXEC[C$]
  12.    '
  13.    ' Open a input/output null channel 
  14.    A$="NIL:"+Chr$(0)
  15.    Dreg(1)=Varptr(A$) : Dreg(2)=1004
  16.    HAND=Doscall(-30)
  17.    '
  18.    If HAND
  19.       '
  20.       ' Send the command to AmigaDos 
  21.       C$=C$+Chr$(0)
  22.       Dreg(1)=Varptr(C$) : Dreg(2)=HAND : Dreg(3)=HAND
  23.       F=Doscall(-222)
  24.       '
  25.       ' Close the channel
  26.       Dreg(1)=HAND
  27.       A=Doscall(-36)
  28.    End If 
  29.    '
  30.    ' -1 if ok 
  31. End Proc[F]