Can someone explain "RLCF INTCON,W,C" to me?

89 Views Asked by At

I'd like help explaining this assembly statement because I don't quite understand it yet:

RLCF INTCON,W,C
1

There are 1 best solutions below

0
Dan1138 On

By taking this statement out of context explaining how this opcode operates is of little use with understanding why this statement is in your source code.

I have used this statement to save the state of the GIE bit in the CARRY flag just before clearing the GIE bit to disable the interrupt system. It is important to remember if the interrupt system was enabled or not before entering a critical section. When exiting the critical section the CARRY flag is tested, if set then set the GIE bit in the INTCON register. This process will restore the saved state of the interrupt enable.

To make a more useful answer requires that you ask a better question.

If you are unfamiliar with terms like critical section or interrupt system it's unlikely that a literal explanation of what the opcode does would help you enough.