Shop OBEX P1 Docs P2 Docs Learn Events
How to force the carry flag to 1 ? — Parallax Forums

How to force the carry flag to 1 ?

BeanBean Posts: 8,129
edited 2010-05-20 02:04 in Propeller 1
Okay, we've been before, but I cannot find the thread.

I need 1 instruction that will set the carry flag without have any specific value in any variable.

In my notes I have:

· rol $,#0 WC,NR·· 'set c flag (because b31=1)

But that doesn't seem right because bit 31 is NOT a 1 for the rol instruction.

The only instruction I see that might work is:

·CMPSUB $,$ WC, NR

It seem kind of strange to set the carry flag if the values are =·doesn't it ??? This isn't a typo·in the manual is it ?

Bean

·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]

Comments

Sign In or Register to comment.