JK's Super Garbage Collection

Author: Johann E. Klasek

History

This project has its origin in the year 1985 caused by BASIC projects that grow larger and larger. The BASIC 2.0 garbage collector turned out to be unacceptable with its undeterministic pausing behavior. After taking over a project called "Programmbibliothek" (managing, sorting and printing disk directory collections for our Freaks Computer Club) the requirements grows higher. The usability, reliability and stability of the program was a major issue. With the original GC of BASIC 2.0 this won't be feasible. The devolopment of some alternative GC implementation was necessary and a solution came into mind. At this time back-link based implementions are already in use by BASIC 4.0, BASIC 3.5 and BASIC 7.0 but this was not an option because each string takes two more bytes, reducing the overall number of available strings. My idea was to take the unused space below the ROMs as a buffer where a whole bunch of active strings can be collected in just one single run. This prevents the otherwise quadratic effort to search the highest string over and over. In addition the string data structure does not change in any way.

The initial version has been finished during 1985 and with version 1.1 it was nearly ready for publication. But the plan to publish this program in the german 64'er magazine was abandoned abruptly because the February issue of 64'er had published a garbage collection implementation with the same basic idea from some other author ("Garbage64"), but which was faulty (what I found out years later through a deeper code analysis).

Technical aspects

How is the Super-GC embedded into BASIC's environment?

Historical usage

The Super-GC was part of a library which provides a couple of functions was used for several projects. These programs proved the reliability over month and years of practical use. But the main application was the "Programm-Bibliothek" for the Freaks Computer Club which ran with sucess for several years.

Download


Copyright and legal notice

The programs may be used and distributed freely as long the reference to author remains.

Further plans

References

  1. C64-Wiki.com: Garbage Collection
  2. C64-Wiki.de: Garbage Collection (german)
  3. ROM listing of the original routine:
    the automatically added comments are not very useful, rather irritating.
  4. Jim Butterfield article list from Compute!
    1. Compute! Issue 10 - March 1981: Learning About Garbage Collection
    2. Compute! Issue 49 - June 1984: Garbage Collection On Commodore Computers
    3. Compute! Issue 50 - July 1984: Commodore Garbage Collection Part 2
  5. 64'er-Magazin Februar 1986: Garbage64 Alternative implementation with buffer basis (like SuperGC), but faulty.
  6. Article from c't magazine 1984/6 S. 72: BASIC intern - Was nicht im Handbuch steht: Teil 3: Strings und 'Garbage collection' (german)
  7. Book "Microsoft-Basic: Konzepte, Algorithmen und Datenstrukturen", Luidger Röckrath, Franzis' Verlag, ISBN: 3772380115 (german)
    6.2.3 Die Stringspace-Reorganisation Garbage collection (GARCOL), S. 123

 


Best viewed with any browser zurück zur Startseite