Hi,
While FREE_MEM is fine for getting the amount of RAM that's
free (hence the name...) at the moment, it doesn't give you the amount of RAM that's
installed.
Finding out the overall amount of memory
installed is not easily achieved on all QDOSMSQ platforms - While you can peek SV_RAMT giving you the
end of RAM, the beginning is not that easy to find - Your best bet could be to assume that RAM starts with the System variables (although on the original box, it's the screen memory - But that could be anywhere on other hardware incarnations).
On the original Box (plus suitable toolkit), the total amount of installed RAM can be found by
PRINT SYS_VARS($20) - (HEX("20000"))
(i.e. RAMTOP - Start of Screen)
This should cover most of the commercially available RAM extensions (internal, QBoard, TrumpCard, even Gold and Super Gold cards) to the original box. Any extension that happens to locate RAM in the lower I/O space would not be covered, however.
The QL memory map can be found here:
http://qdosmsq.dunbar-it.co.uk/doku.php ... memory:map
(That's Norman Dunbar's QL Wiki with loads of more excellent information)
Cheers,
Tobias