www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/06/09:30:54

From: Fadi Rifai <fadi AT kammer DOT uni-hannover DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: phys. & linear addressing?
Date: Fri, 06 Feb 1998 15:01:19 +0100
Organization: RRZN - Newsserver
Lines: 31
Message-ID: <34DB17AE.95661542@kammer.uni-hannover.de>
NNTP-Posting-Host: pcm-1.iw.uni-hannover.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi!

I have allocated Memory space like these way:

 host_meminfo.size=2*_256Kbyte;
 if(__dpmi_allocate_memory(&host_meminfo)==-1){
 printf(" Allocating memory failed!\n",host_meminfo.size);
 exit(2);
 };

and I can access it as following:

 Host_Mem_Selector= __dpmi_allocate_ldt_descriptors (1);;
__dpmi_set_segment_base_address(Host_Mem_Selector,host_meminfo.address);

__dpmi_set_segment_limit(Host_Mem_Selector, host_meminfo.size);

 _farsetsel(Host_Mem_Selector);
  for(DWord =0; DWord < 0x20000 ; DWord+=4)
 {
    _farnspokel(DWord, 0xa0b0c0d0);
 }

  "host_meminfo.address" contents the linear address of memory base.
How can I get the physical address of the memory base?

Thank you in advance

Fadi


- Raw text -


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