[Coco] Expanding 4K Coco Mem

Arthur Flexser flexser at fiu.edu
Fri Jan 2 01:26:28 EST 2015


A little googling identified the utility I was referring to as "The
Stripper" from Eigen Systems.  Apparently, there was also a similar program
by Bob van der Poel called "Packer".  Maybe one or the other is available
online someplace.
These should be useful for those finding tight memory for Basic programs in
the 4K contest.

Art

On Thu, Jan 1, 2015 at 11:23 PM, Arthur Flexser <flexser at fiu.edu> wrote:

> I agree with Robert that there's not much you can do, if the program is in
> Basic, to get around the fact that it and its variables are sandwiched
> between $600 and $FFF in a 4K machine.  You can make up to 200 additional
> bytes available to Basic within that area by using the smallest possible
> CLEAR value that will get by without generating an OS error.
>
> Beyond that, you save a few bytes from packing as much into statement
> lines as possible, avoiding spaces and comments.  There's actually around 5
> or so extra bytes that can be squeezed into each line beyond what can be
> typed in, and utilities exist, or existed at one time, to squash a program
> into the minimum space, combining as many statements as possible into a
> single line.  Maybe one can be found online in the list database.  I think
> there was one advertised in Rainbow called "The Stripper".
>
> To minimize variable space, try reusing the same variable or array for
> multiple purposes.  Or use peeks and pokes to store and retrieve
> single-byte values rather than assigning a variable name.  The cassette
> buffer would be available for such storage.
>
> If part of what needs to be done could be accomplished by a ML routine,
> consider that possibility rather than doing it in Basic.  To minimize
> space, you could end-pack the ML routine rather than poking it in from DATA
> statements.
>
> That's about all the space-saving techniques I can think of at the
> moment.  Good luck!
>
> Art
>
> On Thu, Jan 1, 2015 at 9:43 PM, Jim Gerrie <jimgerrie at ns.sympatico.ca>
> wrote:
>
>> If Darren's suggestion is correct that it is the 256K line buffer and a
>> buffer for possible cassette data file output that explains why there is
>> only 2343 bytes left for a program, is there any magical set of pokes that
>> would allow those buffers to be "turned off" so that the mem could be used
>> by a program?  I think my Tetris just needs about 500 more bytes to fit.
>>
>>
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco
>>
>
>


More information about the Coco mailing list