CLC makes CF = 0, STC makes CF = 1, and CMC flips it. No other flag and no register changes. They are one byte each.
Uses
Returning success or failure from a procedure: DOS and the BIOS set CF = 1 on error, and your own procedures can do the same, ending with CLC / RET on success or STC / RET on failure, so the caller writes a single JC. The flag survives RET and POP, which do not change flags.
Preparing a chain: before the first ADC or RCL of a loop, CLC gives a clean start, so the same loop body can handle every word of a long number. STC feeds a 1 into RCL / RCR.
CMC turns a comparison around without a jump. After CMP AL, 10, CF = 1 means AL is below 10 (unsigned); a CMC makes CF = 1 mean "10 or more". The procedure below reports "not a digit" in CF that way.
MOV AL, 12CALL CHKDIGJC BAD1 ; 12 is not a digitADD AL, '0' ; digit -> characterMOV DL, ALMOV AH, 02h ; DOS: print DLINT 21hJMP DONE1BAD1:MOV DL, '?'MOV AH, 02hINT 21hDONE1:; CHKDIG: CF = 1 when AL is not 0..9CHKDIG PROC NEARCMP AL, 10 ; CF = 1 when AL < 10CMC ; flip: CF = 1 when AL >= 10RETCHKDIG ENDP
Do not confuse them with INC / DEC, which leave CF alone: that is why a multi-word loop can use INC SI between ADCs. Only CF has all three instructions; DF has CLD / STD, IF has CLI / STI, and the others are set with PUSHF / POPF or SAHF.