home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / arosshell.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-31  |  893 b   |  41 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: arosshell.c,v 1.8 1997/01/31 17:52:23 digulla Exp $
  4.  
  5.     Desc: This is the "boot code" of AROS when it runs as an emulation.
  6.     Lang: english
  7. */
  8. #include <dos/dostags.h>
  9. #include <dos/dos.h>
  10. #include <intuition/intuitionbase.h>
  11. #include <proto/dos.h>
  12. #include <proto/exec.h>
  13.  
  14. extern struct DosLibrary *DOSBase;
  15. struct IntuitionBase * IntuitionBase;
  16.  
  17. int main(void)
  18. {
  19.     BPTR segs;
  20.  
  21.     if (!(IntuitionBase = (struct IntuitionBase *)OpenLibrary ("intuition.library",39)) )
  22.     {
  23.     Write (Output (), "Cannot open intuition.library\n", 32);
  24.     return 20;
  25.     }
  26.  
  27.     /* Load the boot shell */
  28.     segs = LoadSeg ("c/shell");
  29.  
  30.     if (segs)
  31.     {
  32.     /* Execute it. */
  33.     RunCommand (segs, AROS_STACKSIZE, "FROM S:Startup-Sequence", 23);
  34.     UnLoadSeg (segs);
  35.     }
  36.  
  37.     CloseLibrary ((struct Library *)IntuitionBase);
  38.  
  39.     return 0;
  40. } /* main */
  41.