| delorie.com/archives/browse.cgi | search |
| From: | Johan Karlsson <k AT sm DOT luth DOT se> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: DPMI Physical Address Mapping |
| Date: | Wed, 23 Jul 1997 09:03:45 +0200 |
| Organization: | Luleå University of Technology |
| Lines: | 32 |
| Message-ID: | <33D5ACD0.4487EB71@sm.luth.se> |
| References: | <199707221500 DOT IAA26323 AT adit DOT ap DOT net> |
| NNTP-Posting-Host: | my21.sm.luth.se |
| Mime-Version: | 1.0 |
| CC: | brown AT signal DOT dra DOT hmg DOT gb, eldredge AT ap DOT net |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Nate Eldredge wrote:
>
> You wrote:
> >/* Map in the board's physical address */
> >my_map->size = 0x01000000;
> >my_map->address = 0x3d000000;
> >
> >if((linear = __dpmi_physical_address_mapping(my_map)) == -1)
> Make that __dpmi_physical_address_mapping(&my_map). The function takes a
> __dpmi_meminfo* argument.
> > printf("Failed to map physical address\n");
> I bet it'll work now.
That is not the problem here. Since -> is used and not . to access the
struct members it must be a pointer.
However, the misstake is that __dpmi_physical_address_mapping does not
return the linear address. It writes the address into my_map->address.
It should be
if(__dpmi_physical_address_mapping(my_map) == -1)
printf("Failed to map physical address\n");
linear = my_map->address;
MVH
Johan Karlsson
mailto:k AT sm DOT luth DOT se
Department of Computer Science and Electrical Engineering
Luleå University of Technology, SWEDEN
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |