Picocalc memory problems due to file size

looks like the picocalc picomite limit on file size.

I have just redone my great circle program and waypoint plotting program to WGS – 84 oblate spheroid formula.

This took my original file from 308 kB to 340 kB generating now a ‘not enough memory’.

It would be nice to keep the WGS – 84 formula but that requires me to reduce memory by:

A. Reducing other applications that may be superfluous but nice additions in any case.

B. Resorting back to the standard spherical formula saving 40 kilobytes

C. Using one spherical for the waypoint routine for short legs (accuracy is not compounded by long legs ) and the WGS-84 for long legs.

C. Or using the crunch command via terra term which would remove all superfluous blanks and all comments. Of course I would save the master BAS file with all comments and spaces in place and only crunch for the pico Calc.

Am I missing another option? Is there a way to increase the 328 kB restriction?

At the moment I will be using the crunch command to shrink the size approximately 25 to 40 kB to meet the picomite restriction. according to the memory command I only need to save approximately 15 kB from the 340 kB to have the routine run.

Has anybody used the crunch command? And is there a physical change I can make to increase that restriction?

Cheers

Look at the CHAIN command (page 136 of the manual) You can break your program up into pieces that are stored on your SD card and CHAIN one part to another. You may have to add flags to keep track of where you are and restructure your program somewhat but CHAIN allows you to use the whole SD card for program space. Also, you can store all your FUNCTIONs and SUBs in a library which gives you up to another 300K of space. I’ve written and run programs that would’ve taken over 800K if they had been written in one source file.

1 Like

a rather large learning curve here!

Absolutely will check into chain command. I did manage to shrink the program from 340 to 300 kB by rationalizing the 2WGS – 84 routines and using commonality between the two as helper functions.

But for expanding I will have to look into the chain command, and the libraries.

Thanks for your help Tom

perfect, succeeded in creating a MFTOOL_library with 100 K of functions.

This of course reduce the size of the main routine and has left lots of space for expansion.

Used your library suggestion Tom!

Thanks immensely

Geoff

I’m glad you found my suggestions helpful. The PicoCalc is a wonderful tool. Much of its potential is still waiting to be discovered. That’s what makes the journey at least as much fun as the destination. We can all join this process of discovery together.

1 Like