Mail Archives: djgpp/1996/11/14/12:45:12
From: | Tero Parvinen <tero AT mnar DOT tky DOT hut DOT fi>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Mapping DOS mem. as near
|
Date: | Thu, 14 Nov 1996 16:34:03 +0200
|
Organization: | Helsinki University of Technology
|
Lines: | 24
|
Distribution: | inet
|
Message-ID: | <328B2DDB.16DDC2BA@mnar.tky.hut.fi>
|
NNTP-Posting-Host: | mnar.tky.hut.fi
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I was wondering if it is possible to map a piece of conventional memory
into the djgpp data selector area. I'm trying to program a DMA routine
which would work by first allocating DOS memory and finding a block of
page aligned memory and then adding __djgpp_conventional_base to the
address and returning this. Then you could use the returned pointer to
write stuff there, and the actual DMA transfer routine would first
subtract __djgpp_conventional_base from the pointer passed to it and
then perform the transfer based on the original DOS address.
Is this possible with __djgpp_map_physical_memory or do I need to
__djgpp_nearptr_enable? Just curious because I think this technique is
used in MikMod as well and there's no mention of any mapping like this.
The little test I ran came (of course) up with an error after I added
the conventional base like described and tried to put stuff into the
buffer without any additional mappings...
Does __djgpp_conventional_base make any sense before calling
__djgpp_nearptr_enable? What would be the best way to cope with this?
Thanks,
--
Tero Parvinen
Tero DOT Parvinen AT hut DOT fi
http://www.niksula.cs.hut.fi/~tparvine
- Raw text -