delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/07/01:39:15

From: paradox AT direct DOT ca (Wesley Terpstra)
Newsgroups: comp.os.msdos.djgpp
Subject: A pointer to physical memory?
Date: Tue, 01 Oct 1996 20:11:11 GMT
Organization: Canada Internet Direct, Inc.
Lines: 21
Message-ID: <3251736e.1891011@news.direct.ca>
NNTP-Posting-Host: nan-as-01a10.direct.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

	Hi.  I just recently switched to the DJGPP GNU C++ compiler,
and have encountered two problems... 1) I need to get a pointer to the
VGA memory.  I know that I can make an array in virtual memory, write
screen output to that, and then use dosmemput to stick it onto the
VGA, but that has overhead I would rather not have...  Is there any
way to directly get a pointer to the VGA memory so that I don't have
to deal with an inbetween buffer?  I could just go char far *vga =
(char far *)0xA0000000L;  if it was TC++, but that doesn't work in
DJGPP due to, (I assume) the memory paging or something to do with
protected mode?  2) I was also wondering if using
__dpmi_lock_linear_region would work to hold a buffer in one region of
physical memory so that I could get the DMA to read from it?  Will the
__dpmi_lock_... work to hold it in one place - and if it does, how can
I get the physical address it is stuck at?  If you know the answer to
either of these questions, PLEASE send me e-mail! :)
(paradox AT direct DOT ca)

P.S.  In case it's not obvious from these questions I know VERY little
about protected and 386 enhanced modes.  In fact, I don't even know
which one DJGPP is using... :)  - Where could I get a good explanation
of what protected mode / 386 enhanced mode does, and how to use it?

- Raw text -


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