Date: Thu, 5 May 94 13:36:32 EDT From: arra AT dsd DOT camb DOT inmet DOT com (Arra Avakian) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Video memory: Native and Windows DOS I am using both C (djgpp) and Ada (djgpp port of DOS), and want to have Ada or C code directly reference the PC character mode video memory, normally at something like address 0xb8000. When running under GO32, the documentation says the first 1M memory is mapped 1:1, so it would appear that it would be possible to reference 0xb8000 directly, but this causes a GP protection. Further documentation mentions that this area is (re?)mapped to 0xe00b8000, and in fact, this address (0xe00b8000) works fine. However, neither 0xe00b8000 nor 0xb8000 work when running the same program in a DOS box under windows 3.11. I notice that some library routines use dosmemput, dosmemget, or movedata, which I suspect switch modes before accessing the "dos" memory. However, I want to directly access the video memory without switching modes. I believe that an real mode program running in a Windows DOS box is free to directly access video memory, with suitable address mapping "magic" to make it work even when the DOS box is not "full screen". Is there a way for a djgpp-compiled C or GNAT-compiled Ada program to directly access video memory in both native DOS AND also in a Windows DOS box? Even a solution that required a different video memory address in the two cases is acceptable, as long as the program can dynamically determine the correct video address based on its operating environment. Arra P.S. Please forgive me if this question is already answered in the documentation. I have looked for the answer, but I may have missed it! ===================== arra AT inmet DOT com Arra Avakian Intermetrics, Inc. 733 Concord Ave Cambridge, MA 02138 (617)661-1840 x4500 =====================