??? 08/08/11 20:28 Read: times |
#183265 - CY in C ? _NOT_ Responding to: ???'s previous message |
Stefan Kanev said:
There is no such thing as carry flag in C, Pascal or whatever we call HLL.
I fully agree with Stefan. serialout = serialout << 1; //left shift datareg _nop_(); SDA = CY; //move carry on SDA line Maunik Choksi, The above code snippett from your previous posting is 100% bogus in C coding. If this somehow gave the appearance of working in some specific instance it was purely by sheer dumb luck. Change the code, compiler version, command line switches, phase of the moon, time of month and the dumb luck will disappear as fast as you can even think of it!! A much more applicable C coding implementation would use code that looks like: SDA = ((serialout & 0x80) ? 1 : 0); serialout <<= 1; Michael Karas |
Topic | Author | Date |
Driving HT16K33 using 89S52 | 01/01/70 00:00 | |
How to post legible source code | 01/01/70 00:00 | |
HLL Delay Routines - beware!! | 01/01/70 00:00 | |
modified code | 01/01/70 00:00 | |
How do you think that will help?? | 01/01/70 00:00 | |
some comments on code | 01/01/70 00:00 | |
testing of new code | 01/01/70 00:00 | |
HLL Delay Routines | 01/01/70 00:00 | |
one thing | 01/01/70 00:00 | |
CY in C ? _NOT_ | 01/01/70 00:00 | |
I'll use new code. | 01/01/70 00:00 | |
Getting success | 01/01/70 00:00 | |
one modification | 01/01/70 00:00 | |
For How Long? | 01/01/70 00:00 | |
No need to use that instruction | 01/01/70 00:00 | |
Start by caring about the C standard | 01/01/70 00:00 | |
Learning the 'C' programming language | 01/01/70 00:00 | |
C Language Supports No Carry Bits | 01/01/70 00:00 | |
Talking to HT16K33 | 01/01/70 00:00 |