Home Page


BASIC Handbook

Basic2 Commands
Disk Drives
PEEK's and POKE's
RAM Memory Map
ROM Memory Map
Screen Display
Sprite
ASCII and CHR$ Codes

eMail
email5-commodorecheetah.co.uk

Note: You will need to replace the '-' with the @ symbol.
This is to minimize spam.

My BASIC Quick Reference Guide

FRE()
Abbreviation: F <SHIFT+R>

TYPE: Function
FORMAT: FRE ( <variable> )

Action: This function tells you how much RAM is available for your program and its variables. If a program tries to use more space than is available, the OUT OF MEMORY error results.
The number in parentheses can have any value, and it is not used in the calculation.

NOTE: If the result of FRE is negative, add 65536 to the FRE number get the number of bytes available in memory.

EXAMPLES of FRE Function:

PRINT FRE(0)
10 X = (FRE(K)-1000)/7
950 IF FRE(0)< 100 THEN PRINT "NOT ENOUGH ROOM"

NOTE: The following always tells you the current available RAM: PRINT FRE(0) - (FRE(0) < 0)* 65536


Commodore Cheetah made by Allen Monks, started in the year 2000.