Reverted latest changes.
[reactos.git] / reactos / ntoskrnl / nt / vdm.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/nt/vdm.c
5 * PURPOSE: Virtual DOS machine support
6 * PROGRAMMER: David Welch (welch@mcmail.com)
7 * UPDATE HISTORY:
8 * Created 22/05/98
9 */
10
11 /* INCLUDES *****************************************************************/
12
13 #include <ddk/ntddk.h>
14
15 #include <internal/debug.h>
16
17 /* GLOBALS *******************************************************************/
18
19 static UCHAR OrigIVT[1024];
20 static UCHAR OrigBDA[256];
21 /* static UCHAR OrigEBDA[]; */
22
23 /* FUNCTIONS *****************************************************************/
24
25 VOID
26 NtEarlyInitVdm(VOID)
27 {
28 /*
29 * Save various BIOS data tables. At this point the lower 4MB memory
30 * map is still active so we can just copy the data from low memory.
31 */
32 memcpy(OrigIVT, (PVOID)0x0, 1024);
33 memcpy(OrigBDA, (PVOID)0x400, 256);
34 }
35
36 NTSTATUS STDCALL NtVdmControl(ULONG ControlCode,
37 PVOID ControlData)
38 {
39 switch (ControlCode)
40 {
41 case 0:
42 memcpy(ControlData, OrigIVT, 1024);
43 break;
44
45 case 1:
46 memcpy(ControlData, OrigBDA, 256);
47 break;
48 }
49 return(STATUS_SUCCESS);
50 }
51
52 /* EOF */