SFR definitions, another method apart from structures
Posted: Fri Jan 07, 2005 6:20 am
I have recenrtly started coding using this compiler and found the lack of SFR definitions disappointing. In defining my own I found that the recommended way involves structures. I found that using this method gave poor result in 'if' statements(it didn't work!). A better way of doing this is:
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
Posted: Fri Jan 07, 2005 7:08 am
They work just fine. Maybe yours didn't work because of this change to the compiler
The compiler operation concerning type conversions to an int1 have changed to
be ANSI compliant.
Old way:
onebit = eightbits; // Same as: onebit = (eightbits != 0)
New way:
onebit = eightbits; // Same as: onebit = (eightbits & 1)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum