(This is the "Dungeon Designs" column from the December 1988 issue of the Eamon Adventurer's Guild newsletter. Copyright 1988 Eamon Adventurer's Guild, 7625 Hawkhaven Dr., Clemmons, NC 27012-9408. You may reproduce this freely as long as this credit remains attached to the article.) ====================================================== Dungeon Designs ------------------------------------------------------ by Tom Zuchowski Increasing free memory space for large adventures. Every time a string is modified or read into memory from disk, it is allocated to fresh memory space. Eventually all of the memory space is used up, and Applesoft executes what is called a forced FRE(0) garbage collection. When this happens, everything grinds to a halt until all the old, discarded strings have been identified and flushed from memory. This can take more than a minute on a large Eamon, and looks for all the world like a hung computer. Very large and complicated MAIN PGMs can lead to low levels of free memory for string storage that can result in excessive FRE(0) garbage collections, causing annoying delays in play. There are several things that you can do to free up more memory (examples are for version 7.0): 1) USE VERSION 7.0: It uses a special string routine that drastically reduces the garbage accumulation, allowing uninterrupted program operation with about 1/8 the free memory required by version 6.2. The routine resides at lines 45-50. 2) DELETE UNUSED COMMANDS: A command can be completely deleted from the pgm. For example, if you have no drinkable artifacts, you don't need the DRINK command. To delete DRINK: change the number in line 31910 from '32' to '31'; delete 'DRINK,' from line 31920; and delete '22000,' from line 290. Or you can: 3) 'DUMMY' UNUSED COMMANDS: A lot of code can be deleted by converting a command to a dummy that doesn't do anything. For example, to 'dummy' DRINK, delete lines 22020-22190, and change line 22010 to: 22010 GOSUB 4900: GOSUB 4804: GOTO 94 This saves about 1/4K of memory. 4) MAKE A COMMAND ARTIFACT-SPECIFIC: For example, if you only have a single drinkable artifact in your adventure (eg: artifact #47), and it doesn't do anything to the player's health (eg: a river), you can delete lines 22020-22190 and replace them with: 22020 IF A < > 47 THEN 94 22030 PRINT "OKAY.": GOTO 98 This saves nearly as much code as option 3, above. Feel free to contact us for more information.