| PLEX86 | ||
Thou shalt have no other gods before the ANSI C standard 1409Randy Howard Those aren't 8-bit ports. Those are ports whose width matches the character size of the machine. So char, or unsigned char if you prefer, works fine. And if you plug that same IO board into a machine with 9-bit characters I'll still use char to access it and it will still work because it will still be 8 bits wide. What shortcuts do you need to use for this utility? There's always Q&D code around, but there no reason to practice writing sloppy code. Some of that extra time may be written off as an investment in improved coding skills. Once you have a firm grasp of the issues it doesn't take any more time to write the code portably. learning how to do that does take some time (in both senses of the word time). OK, a few lines consisting of the inner loop of a single function. Do you have a specific example of something where the 8-bit-ness matters? Note that on modern CPUs and compilers the compiler can probably do the optimization for you (i.e., using architecture-specific info to optimize emitted code). Inline buttembler to do what? The only time I've found that useful was when the compiler didn't support some exotic instructions. So you get a set of one-line, inline functions implementing the strange instructions and put then in one, platform-specific file. When you port the package you translate the one-liners. Note that using buttembly language does not mean you are tied to specific register widths. Thou shalt have no other gods before the ANSI C standard 1410 Fair enough. I wasn't promoting it, I was trying to think of examples where it wouldn't be inherently evil... Remember I am arguing against the statement that software IN GENERAL should be aimed at a few favored architectures. Do isolated examples support the generality of that proposition? Hardly. is there an example of a whole program that justifies tj3 Thou shalt have no other gods before the ANSI C standard 1412 In response to Trevor's challenge, I provided a code example for a time-critical cryptographic computation: basically, evaluating an input polynomial modulo 2^130-5. The code...
|
||||
Thou shalt have no other gods before the ANSI C standard 1410 Alt Folklore Computers from Newsgroups The #1 Usenet Provider on the Internet
Thou shalt have no other gods before the ANSI C standard 1408 |
||||