??? 07/07/04 13:01 Read: times |
#73716 - RE: 4 bit bus? Responding to: ???'s previous message |
How do you do a SWAP instruction in C?
If your compiler is smart, it will interpret your C code to use SWAP, if not you will get something else. If you decide to use C (often a good decision) you are at the mercy of the compiler, do not expect the compiler to use specific instructions. Very often (when using a quality compiler) C generates efficient code, however in some special cases (4 bit interface is a good example) can it be very beneficial to write it in assembler and call it from your C code. I have found that writing assembler usually isn't worth it except in two cases: complex I/O and loops. Erik |
Topic | Author | Date |
4 bit bus? | 01/01/70 00:00 | |
RE: 4 bit bus? | 01/01/70 00:00 | |
RE: 4 bit bus? | 01/01/70 00:00 | |
RE: 4 bit bus? | 01/01/70 00:00 | |
RE: 4 bit bus? | 01/01/70 00:00 | |
RE: 4 bit bus? | 01/01/70 00:00 | |
RE: 4 bit bus? | 01/01/70 00:00 | |
Assembler! | 01/01/70 00:00 | |
RE: Assembler! | 01/01/70 00:00 | |
RE: Assembler! | 01/01/70 00:00 | |
RE: Assembler!![]() | 01/01/70 00:00 |