www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/05/02:15:21

Date: Wed, 5 Jun 1996 09:10:59 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Bryanston School <MOLESWORTH DOT THOMAS AT bryanston DOT co DOT uk>
Cc: DJGPP <djgpp AT delorie DOT com>
Subject: Re: Accessing physical memory
In-Reply-To: <000000244892916766384@bryanston.co.uk>
Message-Id: <Pine.SUN.3.91.960605090756.25305L-100000@is>
Mime-Version: 1.0

On Tue, 4 Jun 1996, Bryanston School wrote:

> >> Is there a way to access physical memory at a specified address without
> >> using farptrs or Fat DS?
> >
> >What's wrong with these two methods?  Without knowing what is it that you
> >are looking for, it is hard to advise you about other ways.
> >
> 
> farptrs: I could use these, but I would prefer to just use
> pointers.
> 
> I have a PCI video capture board which uses physical memory
> to store the data - can I just allocate a buffer in memory
> using malloc(), then map the card into this? Will this work,
> or will the memory allocated be shuffled around?

If what you need is to access a buffer of captured data, you can use
`dosmemget' or `movedata' library functions to move the data from the
board to a buffer allocated with `malloc', then access that buffer as 
usual.  This should be faster than if you were to access the board 
repeatedly, even if you did map it into your address space, because every 
access gets slowed down by the slow bus operation.

- Raw text -


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