Path: utzoo!attcan!uunet!cbmvax!carolyn
From: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Chip RAM
Message-ID: <4270@cbmvax.UUCP>
Date: 15 Jul 88 22:25:49 GMT
References: <3150@polya.Stanford.EDU> <6428@well.UUCP> <2242@sugar.UUCP> <735@applix.UUCP> <11717@agate.BERKELEY.EDU> <2327@antique.UUCP> <737@applix.UUCP> <2333@antique.UUCP> <4790@killer.UUCP> <4266@cbmvax.UUCP>
Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS)
Organization: Commodore Technology, West Chester, PA
Lines: 49

In article <4266@cbmvax.UUCP> carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) writes:
>In article <4790@killer.UUCP> ltf@killer.UUCP (Lance Franklin) writes:
>[]
>>Oh, another thought...with the possibility, in the future, of machines with
>>1 meg of CHIP ram, where do I go to find out the actual end of CHIP ram on
>>any given machine.
>
>[I described scanning Exec mem list]

Dale points out that it's not a really great idea to depend on the
current format of the Exec memlists which should only be dealt with
via the provided system functions, since their exact format could change
in the future.  

So one other option would be to make some educated guesses about where
some chip mem should be and use the TypeOfMem() function to check those
addresses to see of they are CHIP ram.

Don't try to check the very top - if Exec puts its stack there, it removes
that memory from the memlist so that would probably be NO memory, not
CHIP memory.  

In addition, I believe there may be some 3rd-party ramdisks, etc, that
actually grab high memory and remove the memory from the Memlists
(not a good idea for future compatibility).

Currently, since all CHIP mem is mapped in 1st meg of address space,
ignoring the pieces Exec removes from the memlists at the start and 
end for its own devious purposes, the first 1/2 meg of CHIP is from
$0 to $7FFFF, and the second 1/2 meg is from $80000 to $FFFFF.

You'l have to pick some addresses within the second 1/2 meg range to
try TypeOfMem() on, low enough to avoid system stack and possible
3rd party high-chip memlist removals.

You could just check $80000, but remember that this will not tell
you if this RAM is free.  Just that it exists.

Why do you need to know the highest CHIP address they have ????
Wouldn't it be better to know how much CHIP ram they have FREE ??????

That's easy - AvailMem(MEMF_CHIP)
-- 
==========================================================================
  Carolyn Scheppner -- CATS  Commodore Amiga Technical Support
  PHONE 215-431-9180   UUCP  ...{uunet,allegra,rutgers}!cbmvax!carolyn 

 Oh I'm a numberjack and I'm OK, I code all night and I work all day...
==========================================================================