Free memory in Commodore Basic and Garbage Collection | C64 | FRE() @JosipRetroBits
Free memory in Commodore Basic and Garbage Collection | C64 | FRE()  @JosipRetroBits
Uploaded May 2022 | Updated November 2026, 3 hours ago
How to deal with memory in commodore basic. How much available memory do we have on commodore 64?
Explaining how FRE command works, a command that calculates the amount of free memory in basic and does garbage collection on commodore 64.

If You like this video you can buy me a coffee: ko-fi.com/josipretrobits

Code used in this video: github.com/josipk/Commodore64/blob/main/free_memory_c64.txt

Amount of free memory in basic:

?fre(0)+65536*(fre(0){less then}0)
or
sys46374
?(peek(52)-peek(50))*256+(peek(51)-peek(49))


Index:

0:00 - Intro
0:31 - How to use FRE() command
5:07 - Strings in Commodore Basic and effects on memory
7:40 - Garbage collector in Commodore Basic
12:37 - Explaining FRE() command
14:15 - Commodore Basic Memory Map and Stack
17:25 - FRE() command, Assembly code
20:05 - How little is 38911 bytes
23:09 - Memory difference between an array of integers and floats
26:00 - Garbage collector performance
30:12 - Forcing Commodore 64 to run out of the memory
33:07 - Conclusion and The End
Free memory in Commodore Basic and Garbage Collection | C64 | FRE()Acorn Electron | Small computer with powerful BBC BasicUsing Arduino to repair Commodore 64 boards | Build Your Own OscilloscopeCommodore joystick Rebuild!Large number of Patterns in a Single line of Code | Commodore 64Making a Pong Game | Without a single line of codeCommodore 64 DIY Power Switch1-Wire Signal on Commodore 64, talking to DS18B20 temperature probeBuilding a C64 Led sign | Commodore 64 | DIY projectHi-Res 10 Print Maze | Amiga or Croatian Checkerboard | Commodore 64 PatternsAtari 1040STfm Working!!!Kaleidoscope effect | Commodore 64 #clanguage #oscar64 #commodore #retrocomputing #kaleidoscope
Josip Retro Bits |

Free memory in Commodore Basic and Garbage Collection | C64 | FRE()

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER