delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/10/08/09:57:30

Date: Tue, 8 Oct 1996 15:46:53 +0200 (MET DST)
From: Mark Habersack <grendel AT ananke DOT amu DOT edu DOT pl>
Reply-To: grendel AT ananke DOT amu DOT edu DOT pl
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: "John M. Aldrich" <fighteer AT cs DOT com>,
Charles Sandmann <sandmann AT clio DOT rice DOT edu>, DJ Delorie <dj AT delorie DOT com>,
djgpp-workers AT delorie DOT com
Subject: Re: Stub error messages (Was: Re: 'Cannot open')
In-Reply-To: <Pine.SUN.3.91.961007134857.4142A-100000@is>
Message-ID: <Pine.NEB.3.95.961008153746.21692H-100000@ananke.amu.edu.pl>
MIME-Version: 1.0

On Mon, 7 Oct 1996, Eli Zaretskii wrote:

>Instead of falling back to Turbo C, why not read the CMOS?  Surely, if 
>there is *any* place in the PC which knows about the correct amount of 
>memory, it will be there, right?
It will be there until you hit the 64MB limit. Field in CMOS is two bytes
wide, so if a computer has more memory reading values from CMOS will reveal
that there are 0 or 64MB of memory (confirmed. I have checked it on two
computers with 128MB of memory - one of them had 0 in the field, while the
other had 0xFFFF.) Apparently those BIOSes that report 0 in CMOS have the
exact amount of memory stored elsewhere, but where? For now, the only solution
seems to be a 'brute force' method, namely the one used by BIOS POST code. It
just writes patterns to memory and reads them back, comparing whether they are
returned correctly. If it writes to an address which is non-existent on the
computer - it'll know that's the end of installed memory. BTW. This is exactly
how e.g. Check-It works when examining memory. This method is slow, of course,
but the only one available. Another drawback is that it should be run in RM.
PMode will disallow access to some areas of memory, especially if there's some
multi-tasking environment. Having said all that, it seems that there is NO
universal method to be used in PMode (at least under multitasking
environments) - one should find the appropriate system calls undoubtedly
present in these OSes that report the correct amount of installed memory. 

---------------------------------------------------------------------------
You can't brush me under the carpet, you can't hide me under the stairs,
The custodian of your private fears, your leading actor of yesteryear,
Who as you crawled out of the alleys of obscurity, sentenced to rejection
 in the morass of anonymity. You who I directed with a lover's will, you
 who I let hypnotise the lens. You who I let bathe in the spotlights glare.
You who wiped me from your memory like a greasepaint mask, just like a
 greasepaint mask...
-------------------- http://ananke.amu.edu.pl/~grendel -------------------

- Raw text -


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