I\'m writing a program for a 8051 microcontroller. In the first part of the program I do some calculations and based on the result, I either light the LED or not (using CL
The C
here is the 8051's carry flag - called that because it can be used to hold the "carry" when doing addition operations on multiple bytes.
It can also be used as a single-bit register - so (as here) where you want to move bits around, you can load it with a port value (such as P1.7
) then store it somewhere else, for example:
MOV C, P1.7
MOV , C
Then later you can branch on it using:
JB ,