Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:25 11 May 2025 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 : [Micromite]Error:Too Many Subs and Func

Author Message
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:21pm 20 Jun 2014
Copy link to clipboard 
Print this post

Hi

I've just got the Too Many Subs and Functions error on a uMite and the only way I could clear it was to do a reset as per page 15 of the Micromite User Manual and then comment out unused Subs/Funcs from my library and then reload the programme.

Typing "NEW" just kept coming back with the same Error message.

It would be great if MMBasic caught this error and gracefully handled it rather than requiring a reset, eg allowed a NEW.

@TassyJim, Please
Is there any chance MMEdit could

1) Warn that there are too many Subs/Functions as per Page 33 Micromite User Manual PRIOR to downloading the code to the uMite ? and similarly for the Maximite although hitting the limits with the Maximite is much less likely

2) Auto-Crunch unused Subs/Funcs from the download to the uMite

I must admit I got a real fright and thought I'd bricked my uMite (I only have a PicKit 2), but the Reset does work thank goodness.

Many thanks

Peter - GM8JCF
The only Konstant is Change
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 12:44pm 20 Jun 2014
Copy link to clipboard 
Print this post

Interesting bug that you have found there (if you can call any damn bug "interesting").

When you enter NEW or EDIT at the command line MMBasic treats it as if it is running a short program consisting of one command. When it runs a program the first thing that the interpreter does is build a table of the sub/funs in the program stored in flash - this is so that it can immediately jump to them when they are called without having to scan the program. Your problem was that there were too many sub/funs which did not even allow the NEW command to get started.

Sorry for giving you a fright, I will fix this in the next version - and increase the number of sub/funs allowed.

Geoff
Geoff Graham - http://geoffg.net
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:51pm 20 Jun 2014
Copy link to clipboard 
Print this post

Hi Geoff

That was quick ! Thank you.

I can see the merit of how subs/funcs get located and very useful for entering stuff in immediate mode.

What about a statement "RESET" which does what shorting pins 11&12 does ?

Hope all is well

Peter
The only Konstant is Change
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 03:02pm 20 Jun 2014
Copy link to clipboard 
Print this post

  G8JCF said  
@TassyJim, Please
Is there any chance MMEdit could

1) Warn that there are too many Subs/Functions as per Page 33 Micromite User Manual PRIOR to downloading the code to the uMite ? and similarly for the Maximite although hitting the limits with the Maximite is much less likely

2) Auto-Crunch unused Subs/Funcs from the download to the uMite

Many thanks

Peter - GM8JCF


Something like this in the Variable report:

Functions: 2
Subroutines: 25
Total: 27

Variable Type Referred to in line:
InitBCDLib S 17 439
DivConst 19 21 97 267

etc

See the V3.4.14 update post.

Jim
VK7JH
MMedit
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 03:34pm 20 Jun 2014
Copy link to clipboard 
Print this post

Got it
The only Konstant is Change
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025