??? 03/16/05 17:30 Read: times |
#89788 - Kind of is a problem Responding to: ???'s previous message |
Ian Bell said:
... This will certainly reduce code size and speed up execution but goes against the software gurus ideas of code modularity and managing the scope of variables.
Of course, in assembler none of this is a problem. One could say that in assembler this (global variables, etc.) is always a problem. It's just that in assembler it's considered acceptable whereas in 'C' it is frowned upon. But when you get right down to it, if you're going to use global variables in assembler you're not going to loes any modularity by doing the same thing in 'C'. You're just not going to gain all the benefits of 'C' and the "C police" will give you a lack-of-elegance ticket. As I get further into my C-based project, I'm really beginning to feel that 'C' on the 8052 is simply a way to generate the assembly code faster than in assembly, rather than really looking to reap the supposed benefits of 'C'. And, of course, if your code is time-critical then it needs to be written in assembly, period. Regards, Craig Steiner |