Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/28/02 01:43
Read: times


 
#35131 - RE: i need extra code memory!!
I am assuming that since you're a beginner, that you're programming in C (this is a *lot* of code for beginning assembler!). The first thing you want to do is to examine your compiler's assembler output. There are ways of writing your code which will make your compiler more efficient at generating code (and of course the reverse is true!). You may have to try things to see which is best. You compiler manual may give suggestions.

For example, I found that my compiler generates a lot of code when I use pointers to access arrays, less if I use indexes.

You may have to rewrite portions of your program to minimize strings (and constants), create new functions to replace duplicated functionality.

Your linker control file also has some say-so in code useage, but probably has a greater effect if you are out of data space (rather than code space).

Then if that isn't enough, rewrite some functions in assembler, see your compiler manual for assembly language interface.

Unless you were writing in assembler, and I'm assuming you haven't gotten really carried away with your C code, you should still be able to make it fit. My first project was for a 2051, 2K code space, and the first compile gave me over 3K...and it fit with some rework.

Good luck!

Dennis

List of 7 messages in thread
TopicAuthorDate
i need extra code memory!!            01/01/70 00:00      
RE: i need extra code memory!!            01/01/70 00:00      
RE: i need extra code memory!!            01/01/70 00:00      
RE: i need extra code memory!!            01/01/70 00:00      
RE: i need extra code memory!!            01/01/70 00:00      
RE: i need extra code memory!!            01/01/70 00:00      
RE: i need extra code memory!!            01/01/70 00:00      

Back to Subject List