??? 03/16/05 22:54 Read: times |
#89821 - Agree, with caveat Responding to: ???'s previous message |
Ian Bell said:
I think re-use is much more difficult to achieve in embedded systems because of procesor and hardware specifics. I would agree that portability is much more difficult to achieve in embedded systems, but I think code re-use is fairly straight-forward. Even in assembly, a modular design can be achieved by breaking up functions into different files (relocatable) and then assembling the ones you need into the current project. You can even expose and hide certain variables by declaring them PUBLIC (or not). In a sense, each file (or module within a file) becomes an "object". A large amount of code re-use can be achieved. Personally, I'm an absolute/ORG assembly developer myself. I'm so suspicious of development tools--even the one I wrote myself (Pinnacle 52)--that I very seldom use relocatable code. I ORG my programs at 0000h and start coding from there, and all my code resides in a single file. Heavily documented and logically organized, but one file nonetheless. All the more reason to be shocked by the fact that I'm doing a current project in 'C'. Imagine from going from absolute coding in assembly without even considering relocatable code and moving all the way to a 'C' compiler that does just about everything for me. Sometimes I surprise even myself. :) Regards, Craig Steiner |