| ??? 09/05/06 16:59 Modified: 09/05/06 17:00 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#123687 - yes, they are Responding to: ???'s previous message |
when you move to C you move to a 'universal language'. Anything universal will have limits compared to the specific.
so rotate left in C could be if (var & 0x80)
{
var <<= 1;
var != 0x01;
}
else
{
var <<= 1;
}I'm trying to rewrite I2C routines in C from assembly to practice C programming,
I/O is not the best place to get your feet wet in C Erik |
| Topic | Author | Date |
| RL & RLC inst in C | 01/01/70 00:00 | |
| yes, they are | 01/01/70 00:00 | |
| yes, they are | 01/01/70 00:00 | |
| mistype | 01/01/70 00:00 | |
| Choose the best tool for the job. | 01/01/70 00:00 | |
| another option (without if) | 01/01/70 00:00 | |
| C style | 01/01/70 00:00 | |
| May Be This Way | 01/01/70 00:00 | |
| No, that won't work! | 01/01/70 00:00 | |
| ways to skin the cat | 01/01/70 00:00 | |
| Compiler dependant | 01/01/70 00:00 | |
| compiler independent, but still very ugly version | 01/01/70 00:00 | |
| Thank You | 01/01/70 00:00 | |
| A very important point! | 01/01/70 00:00 | |
| It is nice C | 01/01/70 00:00 | |
| Not necessarily | 01/01/70 00:00 | |
| Problem solved | 01/01/70 00:00 | |
| Keil-specific | 01/01/70 00:00 | |
Thank you | 01/01/70 00:00 |



