Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:33 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Minimizing code size on Picomite

Author Message
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 01:37am 24 Nov 2023
Copy link to clipboard 
Print this post

Hi All

I seem to recall reading (but now can't find it) that there is a way of removing comments
and spaces to reduce the size of the interpreted file.

I am sure in the next few weeks I am going to run out of memory or Flash space for my code.
However retaining the original file with all the comments and formatting correct is essential.
So, you would only copy the "cleansed" file to the picomite to run.

Have I lost it ???

If so, any suggestions on saving space appreciated.
Regards
Hervey Bay Qld.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1109
Posted: 01:42am 24 Nov 2023
Copy link to clipboard 
Print this post

Look at the "autosave" command as used with a terminal program.
Visit Vegipete's *Mite Library for cool programs.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 01:56am 24 Nov 2023
Copy link to clipboard 
Print this post

MMEdit will do it.

Bill
Keep safe. Live long and prosper.
 
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 02:32am 24 Nov 2023
Copy link to clipboard 
Print this post

Hi All

Thanks for the replies.
So, are you saying that when I send the .bas file to the Picomite
with MMCC, it will "optimize" the code ?
Regards
Hervey Bay Qld.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 03:18am 24 Nov 2023
Copy link to clipboard 
Print this post

  Dinosaur said  Hi All

Thanks for the replies.
So, are you saying that when I send the .bas file to the Picomite
with MMCC, it will "optimize" the code ?


No

If you manually transfer a file using AUTOSAVE CRUNCH the bas file gets crunched as it is stored on the 'mite

An alternative is to crunch within MMEdit

In the Program menu it is safe to try "Crunch"
It will open anew tab with a crunched version which you can then upload.

From the MMEdit Help
  Quote  Crunch: Performs the three above operations in one step as well as removing a lot of unnecessary white space. It tends to make code harder to read so is not recommended unless you are really short on space.
It opens a new tab with the resulting file, leaving the original intact. Lines starting with # are left intact.
By default the first line is left intact even if it is a comment. The first line is special!


MMCC does not make use of the CRUNCH option for AUTOSAVE.

Neither way will "optimize" your code, just remove white space etc.

Jim
VK7JH
MMedit   MMBasic Help
 
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 03:22am 24 Nov 2023
Copy link to clipboard 
Print this post

Hi All

Thanks Jim, that clears that up.
Regards
Hervey Bay Qld.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024