added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / all-hosted / aros.c
blob9c73ff23af3907ab709da8c68844a2372adfd030
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
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 <dos/dosextens.h>
11 #include <dos/filesystem.h>
12 #include <proto/dos.h>
13 #include <proto/intuition.h>
14 #include <proto/exec.h>
16 #define CANNOT_LOAD_SHELL "Unable to load C:shell\n"
17 #define CANNOT_OPEN_CON "Cannot open boot console\n"
19 int main(struct ExecBase * SysBase, struct DosLibrary * DOSBase)
21 LONG rc = RETURN_FAIL;
23 BPTR sseq = Open("S:Startup-Sequence", FMF_READ);
24 BPTR cis = Open("CON:103/20///Boot Shell/AUTO", FMF_READ);
26 if (cis)
28 struct TagItem tags[] =
30 { SYS_Asynch, TRUE },
31 { SYS_Background, FALSE },
32 { SYS_Input, (IPTR)cis },
33 { SYS_Output, (IPTR)NULL },
34 { SYS_Error, (IPTR)NULL },
35 { SYS_ScriptInput, (IPTR)sseq },
36 { TAG_DONE, 0 }
39 rc = SystemTagList("", tags);
40 if (rc != -1)
42 cis = NULL;
43 sseq = NULL;
45 else
46 rc = RETURN_FAIL;
48 else
50 PutStr(CANNOT_OPEN_CON);
53 Close(cis);
54 Close(sseq);
56 return rc;