Release 941017
[wine/gsoc-2012-control.git] / miscemu / kernel.c
bloba2a559fc0202b226fec1981c517c74b789804b06
1 static char RCSId[] = "$Id: kernel.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
2 static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include "prototypes.h"
7 #include "regfunc.h"
8 #include "options.h"
9 #include "stddebug.h"
10 #include "debug.h"
12 extern unsigned short WIN_StackSize;
14 /**********************************************************************
15 * KERNEL_LockSegment
17 int
18 KERNEL_LockSegment(int segment)
20 if (segment == -1)
21 segment = *(Stack16Frame + 6);
23 if (Options.relay_debug)
24 fprintf(stddeb,"LockSegment: segment %x\n", segment);
26 return segment;
29 /**********************************************************************
30 * KERNEL_UnlockSegment
32 int
33 KERNEL_UnlockSegment(int segment)
35 if (segment == -1)
36 segment = *(Stack16Frame + 6);
38 if (Options.relay_debug)
39 fprintf(stddeb,"UnlockSegment: segment %x\n", segment);
41 return segment;
44 /**********************************************************************
45 * KERNEL_InitTask
47 KERNEL_InitTask()
49 _BX = 0x81;
50 _AX = 1;
51 _CX = WIN_StackSize;
52 _DX = Options.cmdShow;
53 _DI = _DS;
55 /* FIXME: DI should contain the instance handle of the caller, _DS doesn't
56 always work as the caller might have changed it. */
58 _SI = 0;
59 ReturnFromRegisterFunc();
60 /* Function does not return */
63 /**********************************************************************
64 * KERNEL_WaitEvent
66 int
67 KERNEL_WaitEvent(int task)
69 if (Options.relay_debug)
70 fprintf(stddeb,"WaitEvent: task %d\n", task);
71 return 0;