Date: Thu, 10 Feb 94 17:47:03 EST From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock) To: tjko AT math DOT jyu DOT fi Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Direct video memory access? Reply-To: babcock AT cfa DOT harvard DOT edu > Since it would be great to be able make same C/ASM sources to > work in OS2 and DOS. What I especially need is the ability to use virtually > same 32bit assembler routines that access video memory (text/graphics) > under both operating systems. It's relatively easy if you are writing in assembler. See DOSMEM.S for an example of how to get a selector which points at the first MB in either VCPI or DPMI mode. Then, load this selector in gs and use it to access DOS memory. What I did was to write my video access routines in C as if I had a pointer to low memory, then got assembly language output and added gs overrides by hand. I'm only working in text mode; I don't know if graphics mode complicates things.