| ??? 01/22/08 13:30 Read: times |
#149831 - portable, schmortable Responding to: ???'s previous message |
the issue of 'portability' in small embedded is greatly overrated.
The likelyhood of something being transferred to another architecture is infinitessimally small. Should that happen, there will be so much that need to be changed that some attempt at portability in the original code will save just abhout 1% of the "porting time". That saved time will be far less than the hours upon hours spent on making the original code 'portable'. In the unlikely event that a porting should happen, then, if you, in the original code have e.g. an int defined as U16 and the new home for the code has the opposite endianness remove the definition for U16 make a new one #define UI unsigned int and "fix the compile errors" by observing and changing every U16 to UI while checking if the endianness matter (sounds cumbersome, but is not - I have done it) Erik |
| Topic | Author | Date |
| SDCC, copying integer in ASM | 01/01/70 00:00 | |
| Shift-and-mask, or union | 01/01/70 00:00 | |
| I used asm tag and the rr command but.... | 01/01/70 00:00 | |
| Your question | 01/01/70 00:00 | |
| Portable unions | 01/01/70 00:00 | |
| Less non-portable? | 01/01/70 00:00 | |
| Less non-portable | 01/01/70 00:00 | |
| portable, schmortable | 01/01/70 00:00 | |
| Disagree! | 01/01/70 00:00 | |
| how portable? | 01/01/70 00:00 | |
| emphasis | 01/01/70 00:00 | |
Real world portable | 01/01/70 00:00 | |
| using - does not give the same result | 01/01/70 00:00 | |
| try this | 01/01/70 00:00 | |
| You are exceeeding 2 byte signed integer limits | 01/01/70 00:00 | |
| Fighting the tools | 01/01/70 00:00 | |
| Thanks all. | 01/01/70 00:00 | |
| Dangerous | 01/01/70 00:00 | |
| Very important warning! | 01/01/70 00:00 |



