delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/12/08:56:19

Xref: news2.mv.net comp.os.msdos.djgpp:3730
From: rick AT efn DOT org (Rick Bronson)
Newsgroups: comp.os.msdos.djgpp
Subject: anyone tried __djgpp_map_physical_memory ?
Followup-To: comp.os.msdos.djgpp
Date: 12 May 1996 05:25:32 GMT
Organization: Invivo Research Inc.
Lines: 28
Distribution: world
Message-ID: <RICK.96May11222532@dynip69.efn.org>
NNTP-Posting-Host: dynip74.efn.org
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,
  Has anyone tried using __djgpp_map_physical_memory?  I can't seem to
get anywhere with it.  Heres what I try:

  meminfo.size = size_pg_align;
  meminfo.address = 0;  /* any address is acceptable */
  ret_val = __dpmi_allocate_memory(&meminfo);  /* COMMIT is 1 for DPMI 1.0 AX=0504 */
  printf ("504 %d 0x%x\n", ret_val, __dpmi_error);
  linear_address = meminfo.address;
  ret_val = __djgpp_map_physical_memory((void *) linear_address, size_pg_align, addr_pg_align);
  printf ("dj map %d \n", ret_val);
  printf ("dj map lin = 0x%x  phys addr = 0x%x\n", linear_address, addr_pg_align);
  return ((void *) (linear_address + rem_pg_align));

Here is what I get for output:

504 0 0x0
dj map -1
dj map lin = 0x80aa6000  phys addr = 0xf2000000

  So the alloc worked but then the map failed.  BTW size_pg_align is
0x1000, addr_pg_align is 0xf2000000.  I'm using V2 under Linux to
build it, running with CSWDPMI under dos with only himem running (no
Windows). 

 Thanks for any and all help.

  Rick

- Raw text -


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