??? 12/04/07 16:43 Read: times |
#147857 - I give a hoot about portability Responding to: ???'s previous message |
Obviously you can't move whole projects over, but I have four or five active CPUs in products that are vaguely similar. I can use dozens of the same C modules in all of them, with only a modification to the lowest level hardware access routines. Consider the lowly character LCD that we discuss here all the time. Once you do your custom low level write byte and read byte functions, then all the higher level stuff is common across all platforms.
Another example, I use my own BOOL type that on an 8051 is a bit var, but on other CPU's is an unsigned char. So for the return val of a function it's handy to just do something like: BOOL LcdInit(params...); |
Topic | Author | Date |
How to write portable code | 01/01/70 00:00 | |
C is a language - not a compiler | 01/01/70 00:00 | |
PL/M | 01/01/70 00:00 | |
Have you considered PLM2C? | 01/01/70 00:00 | |
A good point - often missed | 01/01/70 00:00 | |
So what's the downside? | 01/01/70 00:00 | |
Complex code - Libraries | 01/01/70 00:00 | |
COTS libraries versus inhouse libraries | 01/01/70 00:00 | |
Hence portability is not such a big issue! | 01/01/70 00:00 | |
There are downsides | 01/01/70 00:00 | |
Portability vs. Readability/Maintainability. | 01/01/70 00:00 | |
who gives a hoot about portability | 01/01/70 00:00 | |
Portable by BIOS | 01/01/70 00:00 | |
I give a hoot about portability | 01/01/70 00:00 | |
I am definitely not arguing against "code reuse" | 01/01/70 00:00 | |
HAL | 01/01/70 00:00 | |
Small and easy things that may make Your day | 01/01/70 00:00 | |
The developer is probably the biggest factor | 01/01/70 00:00 | |
I may take issue with this one... | 01/01/70 00:00 | |
general re 'portable code' | 01/01/70 00:00 |