| delorie.com/archives/browse.cgi | search |
| From: | broeker AT acp3bf DOT knirsch DOT de (Hans-Bernhard Broeker) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Allocating DOS memory in Windows |
| Date: | 3 Nov 1999 18:07:57 +0100 |
| Organization: | RWTH Aachen, III. physikalisches Institut B |
| Lines: | 27 |
| Message-ID: | <7vpq5d$bh9@acp3bf.knirsch.de> |
| References: | <38205BE6 DOT B7CF872B AT lucent DOT com> |
| NNTP-Posting-Host: | acp3bf.physik.rwth-aachen.de |
| X-Trace: | nets3.rz.RWTH-Aachen.DE 941648881 87 137.226.32.75 (3 Nov 1999 17:08:01 GMT) |
| X-Complaints-To: | abuse AT rwth-aachen DOT de |
| NNTP-Posting-Date: | 3 Nov 1999 17:08:01 GMT |
| X-Newsreader: | TIN [version 1.2 PL2] |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Tim Updegrove (tupdegrove AT lucent DOT com) wrote: > This is a followup to a question on 10/15/99. I'm trying to get a > program which allocates DOS memory for a DMA buffer to work when booting > to MS-DOS and also work in a MS-DOS box under Windows 98. I can get > each to work in a separate program but I'm hoping to find a solution > that works both places in a single program. Here are the steps that > I've found to work. > Booting to MS-DOS: > 1. Allocate DOS memory and use the returned segment*16 for the physical > DMA address and use the returned selector with _farpeekl and _farpookl. > In a MS-DOS box with Windows 98: [rather complicated way ...] To me, this looks like you're overlooking the easy and obvious solution: 1) Allocate DOS memory with __dpmi_allocate_dos_memory 2) Use the returned segment together with _dos_ds in the _far* functions, or in _movedata(). AFAIK, this method is guaranteed to work under any DPMI server, i.e. regardless wether you're using Windows, or raw DOS with CWSDPMI. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |