3 * Code to detect the surrounding DOS/Windows environment and support routines to work with it
4 * (C) 2009-2012 Jonathan Campbell.
5 * Hackipedia DOS library.
7 * This code is licensed under the LGPL.
8 * <insert LGPL legal text here>
16 #include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
26 #include <hw/cpu/cpu.h>
27 #include <hw/dos/dos.h>
28 #include <hw/dos/doswin.h>
29 #include <hw/dos/dosntvdm.h>
31 /* DOS "list of lists" pointer */
32 unsigned char FAR *dos_LOL=NULL;
34 /* MS-DOS "list of lists" secret call */
35 #if TARGET_MSDOS == 32
37 unsigned char *dos_list_of_lists() {
38 return NULL;/*not implemented*/
41 static void dos_realmode_call(struct dpmi_realmode_call *rc) {
46 mov edi,rc ; we trust Watcom has left ES == DS
51 unsigned char *dos_list_of_lists() {
52 struct dpmi_realmode_call rc={0};
55 dos_realmode_call(&rc);
56 if (rc.flags & 1) return NULL; /* CF */
57 return (dos_LOL = ((unsigned char*)((rc.es << 4) + (rc.ebx & 0xFFFFUL))));
61 unsigned char far *dos_list_of_lists() {
73 return (dos_LOL = ((unsigned char far*)MK_FP(s,o)));