bmcculla said:
But if I rotate one time, then call a subroutine or goto other place, the carry flag already change.
The standard way to do this is to push any registers that the subroutine uses onto the stack. The subroutine stores the old values on the stack and then pops them off and restores the registers before returning. This way you don't have to worry about the subroutine messing up the calling code.
You obviously don't program PIC's! - it's a RISC processor, and doesn't have instructions for storing and popping registers in the stack - there's no point really, the stack is EXTREMELY small. The usual stack size is either 4 or 8 bytes, that's all.
But basically he's never explained what he's actually wanting to do?, just how he's trying to implement it - and he 'might' not be going about it the best way?.