Michael Grunditz writes:
> How do I know how much ram I have from standard qdos ?
On a QL under Qdos you could do
FREE_MEM = PRINT PEEK_L(163856) - PEEK_L(163852) - 512
or more correctly
FREE_MEM = PRINT PEEK_L(SYS_VARS + 16) - PEEK_L(SYS_VARS + 12) - 512
The extra 512 bytes are to leave some room for the system to breathe.
Anything with TK2, such as a QL with a disk IF or SMSQ/E will have FREE_MEM
built in as a function.
In assembler you might try
* free mem example (a0 -> sysvars)
move.l sys_sbab(a0),d1 bottom end of basic area
sub.l sys_fsbb(a0),d1 subtract base of free mem area
sub.l #1024,d1
The resulting figure only represents the largest contigous block of ram
available. To find out the real amount of free RAM is rather more difficult
as it depends entirely upon how much you need to use in one go. The details
of that, as they always say, is beyond the scope of this document ;)
Per