Command for total amount of RAM installed?
Command for total amount of RAM installed?
This is pretty noobish to ask, but how do I get the amount of RAM installed from the Basic?
Re: Command for total amount of RAM installed?
FREE_MEM function is a part of Toolkit II (or Thor XVI formware, or almost any Toolkit II equipped QFLP floppy ROM).
Sample of usage:
PRINT FREE_MEM
The total RAM amount is displayed on start-up by Minerva ROM.
Sample of usage:
PRINT FREE_MEM
The total RAM amount is displayed on start-up by Minerva ROM.
Re: Command for total amount of RAM installed?
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
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
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
-
- RWAP Master
- Posts: 2848
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Command for total amount of RAM installed?
On a standard QL,
gives the amount of free memory in Kilobyes
gives the total amount of memory available.
Code: Select all
PRINT (PEEK_L(163856)-PEEK_L(163852)-1024)/1024
Code: Select all
PRINT (PEEK_L(163872)/1024 - 128)
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Command for total amount of RAM installed?
Thanks guys You were fast, as always! Off to test my QL...