I gotta parrot sayzer, why is that important? Are you trying to find out what code to leave off in order to use a pic with less space?Originally Posted by sayzer
JS.
Curiousity killed the cat
Satisfaction brought him back.
I gotta parrot sayzer, why is that important? Are you trying to find out what code to leave off in order to use a pic with less space?Originally Posted by sayzer
JS.
Curiousity killed the cat
Satisfaction brought him back.
I know about the compiler warnings. I have now re-arranged some code and removed a subroutine, it is now 4.7k and does not have problems.
Thanks for the comments.
Hi, Aerostar
I've already noted some troubles as you describe ... diseappearing when subs are re-arranged !!!
Generally when subroutines are placed at the end of the program , not so far from boundary limits ... ( If - Then tests not working i.e. )
I wrote a thread about that in those columns ... but no definitive answer !!!
Can't find a satisfying explanation to that ...
Alain
Last edited by Acetronics2; - 13th December 2006 at 12:35.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Originally Posted by Acetronics
Now that's different...I've always put my sub's at the beginning of the program and jumped over them and haven't had a problem. Huh... even more unsatisfying isn't it?
JDG
On older version of PBP there was an issue with the placement of sub's. I think it was prior to 2.32. After that there was no limit as to where one can put his sub's. BUT, I found that rearranging the subs, there was a great improvment on the final code size.
I suppose this is explained considering the boundary limits and the asm commands used by the compiler.
Ioannis
So in this case, where do we put the subs then?
Based on what criteria do we arrange the subs?
---------------------------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi Sayzer. Well, now there is no official directive as to where is better placed a sub. According to old practice, on top. But this does not affect in any way the execution.
I only pointed out that if one has 5 sub's for example, and have different sizes, rearranging the order of them is affecting the final code size. I think is because a bigger sub might fall between two pages while others won't.
After a little experimenting you can find that your code might reduce up to 20% or more! Also if you change your variables to be placed on BANK0 also may help. Especially if there are arrays in the program. I had a program reduced from 7540 bytes to 6200 using the above!
Ioannis
Bookmarks