Moved most global data out of the LPDOSTASK structure.
Allocate DPMI real-mode segments globally at startup.
Try to allocate DOS memory at address 0.
diff --git a/include/ldt.h b/include/ldt.h
index c6ae65c..d600042 100644
--- a/include/ldt.h
+++ b/include/ldt.h
@@ -60,6 +60,8 @@
#define PTR_SEG_OFF_TO_LIN(seg,off) \
((void*)(GET_SEL_BASE(seg) + (unsigned int)(off)))
+#define PTR_REAL_TO_LIN(seg,off) \
+ ((void*)(((unsigned int)(seg) << 4) + LOWORD(off)))
#define PTR_SEG_TO_LIN(ptr) \
PTR_SEG_OFF_TO_LIN(SELECTOROF(ptr),OFFSETOF(ptr))
#define PTR_SEG_OFF_TO_SEGPTR(seg,off) \