delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/02/10/18:49:37

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019