Mail Archives: djgpp/2001/06/05/19:45:08

From: "Yury A. Zaitsev" <yurick AT oblik DOT dp DOT ua>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: __djgpp_map_physical_memory - some questions
Date: Tue, 5 Jun 2001 21:36:06 +0300
Organization: Apex NCC Public InterNet News Server
Lines: 40
Message-ID: <mq8jf9.n6s.ln@nix-if1>
References: <r6e3f9 DOT tu3 DOT ln AT nix-if1> <7458-Thu31May2001062819+0300-eliz AT is DOT elta DOT co DOT il> <jtb8f9 DOT 4ql DOT ln AT nix-if1> <2110-Sat02Jun2001085247+0300-eliz AT is DOT elta DOT co DOT il>
X-Trace: 991782348 57230 (5 Jun 2001 23:05:48 GMT)
X-Complaints-To: abuse AT apex DOT dp DOT ua
NNTP-Posting-Date: 5 Jun 2001 23:05:48 GMT
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.2.19 (i686))
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Sat, 02 Jun 2001 08:52:48 +0300, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:

>> EZ> The docs clearly says that this is DPMI 1.0 function, and that most
>> EZ> DPMI hosts don't support it.  Windows doesn't.
>>    I has been read docs but I hoped against hope :)
EZ> Abandon hope, anyone who uses Windows ;-)
	 But IMHO djgpp works better under windoze dos session, not under 
dosemu :(, isn't it? 
    I am working in Linux (I like penguins ;) but sometimes I need to 
compile dos program with really cool djgpp ;). That's why I need to 
use windows ;(.

>>    Well, what can I do with it? Can I use _farpoke*() with _dos_ds 
>> for this? I need to access physical address 0xeb000000 (which is not 
>> in 1st meg of course). And will DPMI host allows such access or I must
>> make some other calls for this?
EZ> What is at that address?  If it's some memory-mapped device, you
EZ> should be able to use the method described in section 18.7 of the
    Wow!!! It's great! It's really works! Thank you! :)

>>       And if _farpoke*() is answer, I can't understand, how this works? 
>> I hasn't allocated memory at this address so DPMI host must blame me, 
>> hasn't it?
EZ> Without mapping that address into some segment for which there's a
EZ> valid descriptor, you will indeed get a Page Fault.  _farpeek* and
EZ> _farpoke* only work for valid selectors.  One of the things the code
EZ> presented in section 18.7 of the FAQ does is indeed create a
EZ> descriptor for the memory you are mapping in.
    Thank you, I am understand now.

P.S: I have yet another question (not about memory mapping :).
Why time() is so _incredible_ slow? 100 000 calls of dj's time() takes 
about 4-5 seconds on the my Cel900 (win95osr2)! I thinked that 
this is because time() is so complex but under linux (glibc 2.1)
about 10 000 000(!) time() calls also takes about 3-4 seconds...
So djgpp's time() is about 100 times slower than linux's time() :(.
    I has been forced to use clock() (which works fast) instead of time()
because I need to call it many times...

- Raw text -

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