Release 950216
[wine] / miscemu / kernel.c
1 /*
2 static char RCSId[] = "$Id: kernel.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
3 static char Copyright[] = "Copyright  Robert J. Amstadt, 1993";
4 */
5
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include "prototypes.h"
9 #include "regfunc.h"
10 #include "options.h"
11 #include "stddebug.h"
12 #include "debug.h"
13
14 extern unsigned short WIN_StackSize;
15
16 /**********************************************************************
17  *                                      KERNEL_LockSegment
18  */
19 int
20 KERNEL_LockSegment(int segment)
21 {
22     if (segment == -1)
23         segment = pStack16Frame->ds;
24
25     if (debugging_relay)
26         fprintf(stddeb,"LockSegment: segment %x\n", segment);
27
28     return segment;
29 }
30
31 /**********************************************************************
32  *                                      KERNEL_UnlockSegment
33  */
34 int
35 KERNEL_UnlockSegment(int segment)
36 {
37     if (segment == -1)
38         segment = pStack16Frame->ds;
39
40     if (debugging_relay)
41         fprintf(stddeb,"UnlockSegment: segment %x\n", segment);
42
43     return segment;
44 }
45
46 /**********************************************************************
47  *                                      KERNEL_InitTask
48  */
49 void KERNEL_InitTask(void)
50 {
51     _BX = 0x81;
52     _AX = 1;
53     _CX = WIN_StackSize;
54     _DX = Options.cmdShow;
55     _DI = _DS;
56
57 /* FIXME: DI should contain the instance handle of the caller, _DS doesn't
58           always work as the caller might have changed it. */
59
60     _SI = 0;
61     ReturnFromRegisterFunc();
62     /* Function does not return */
63 }
64
65 /**********************************************************************
66  *                                      KERNEL_WaitEvent
67  */
68 int
69 KERNEL_WaitEvent(int task)
70 {
71     if (debugging_relay)
72         fprintf(stddeb,"WaitEvent: task %d\n", task);
73     return 0;
74 }