BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Jul 17, 2018 4:54 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: 320 bytes free in Micro IDE but -170 bytes in Studio2 ??
PostPosted: Sat Oct 16, 2010 12:30 pm 
Offline
Citizen

Joined: Wed Mar 13, 2002 7:00 pm
Posts: 36
Hi
When I compiled my old Program in Studio2, I get an out of memory error, even I “optimize for size” in “Preferences”
In the old BasicMicro IDE there was about 320 bytes free.
In the Studio -170
Is there a reason why Studio uses more Atom40 Memory ??
Heinz


Top
 Profile  
 
 Post subject: Re: 320 bytes free in Micro IDE but -170 bytes in Studio2 ?
PostPosted: Tue Oct 19, 2010 5:27 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Can't be RAM you are talking about because 320 is more than the Atom/Nano has. So I am assuming you are talking about program memory.

A 490 byte difference from two versions that are over a year apart indicates either your old program was compiled for size (you can enable compiling for size in Studio preferences as well) or you are using some commands that had bug fixes. For example, ADin got about that much bigger to be compatible with all the new processors, it uses a table lookup system for determing which pins are A/D pins which added quite a bit of code but made it full proof.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: 320 bytes free in Micro IDE but -170 bytes in Studio2 ?
PostPosted: Tue Oct 19, 2010 10:59 pm 
Offline
Citizen

Joined: Wed Mar 13, 2002 7:00 pm
Posts: 36
Hi Nathan
Yes.. mistake I mean Program memory
and I speak about a Atom40.
Both the IDE 05.3.1.0 and the studio2, I have compiled for size.

MBasic PRO Compiler 5.3.1.0
….
Stack size recalculated to fit in BANK0
STACK = 15
Linking...
Ram Memory Bytes Used(System): 20
Ram Memory Bytes Used(Stack): 60
Ram Memory Bytes Used(User): 103
Ram Memory Bytes Free: 169
Program Memory Bytes Used(Library): 5040
Program Memory Bytes Used(Tokens): 8491
Program Memory Bytes Used(Total): 13531
Program Memory Bytes Free: 329
Tokens Compiled: 5707
Lines Compiled: 1575
No Errors Detected

Did nor use ADin.
About 500 byte different looks a bit much to me ..but O.K.

Heinz


Top
 Profile  
 
 Post subject: Re: 320 bytes free in Micro IDE but -170 bytes in Studio2 ?
PostPosted: Wed Oct 20, 2010 9:56 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
May seem like a lot but a lot changed in what amounts to nearly 2 years since 5.3 was released. Mainly all command arguments are now handled as 32bit values which added some more overhead as well. Also ADIN wasn't the only major change to commands. A large program that uses a lot of library commands could easily see a 500byte increase in size.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO