2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: WB1.x C:LoadWB ROM Workbench startup code
8 #include <aros/debug.h>
9 #include <exec/types.h>
10 #include <exec/resident.h>
11 #include <exec/ports.h>
12 #include <dos/dosextens.h>
13 #include <proto/exec.h>
14 #include <workbench/workbench.h>
15 #include <proto/workbench.h>
18 #define STR(A) _STR(A)
20 #define NAME "workbench.task"
23 const TEXT WBTAG_NAME
[] = NAME
;
24 const TEXT WBTAG_VERSION_STRING
[] = NAME
" " STR(VERSION
) "." STR(REVISION
) " (" ADATE
")\n";
26 extern void Init(void);
29 /* ROMTAG here because jump table must come immediately after it */
31 " .globl WBTAG_NAME\n"
32 " .globl WBTAG_VERSION_STRING\n"
39 "wbtag: .word 0x4afc\n"
47 " .long WBTAG_VERSION_STRING\n"
49 /* Strange jump table. Do not touch! \n */
50 /* MUST come immediately after ROMTAG! */
52 /* Old entry points */
59 /* KS 1.2/1.3 entry point */
61 "Init2: move.l %d0,%sp@-\n"
68 ULONG
RealInit(ULONG mode
)
70 struct Process
*pr
= (struct Process
*)FindTask(0);
71 struct Message
*msg
= NULL
;
72 struct Library
*WorkbenchBase
;
75 D(bug("wb.task %d\n", mode
));
77 WaitPort(&pr
->pr_MsgPort
);
78 msg
= GetMsg(&pr
->pr_MsgPort
);
80 WorkbenchBase
= TaggedOpenLibrary(TAGGEDOPEN_WORKBENCH
);
82 rc
= StartWorkbench(0, 0);
83 CloseLibrary(WorkbenchBase
);
87 D(bug("wb return code = %d\n", rc
));