(Yes I am reviewing my Motorola 68000 Reference from 1979.)
Probably what you re thinking of is the 68000 s rather strange X bit. The eXtend bit is essentially a copy of the C (carry) bit, but isn t affected by non-arithmetic instructions.
Suppose you are adding 12-word integers, for example. In x86, you might see something like:
.
.
loop:
ADC AX,[SI] ; recycle carry-out from last iter as carry-in to this one
LEA SI, [SI+2] ; flags untouched
INC BX ; BX is loop index. sets all flags except CF
CMP BX, 12 ; doh, changes carry (BUG)
JB loop
This code doesn t work because the compare instruction mucks up the carry flag. This is one reason why the loop
instruction was historically useful, counting CX down to zero without modifying flags. Counting down to zero with dec
/ jnz
also works, but causes partial-flag stalls on modern x86. Unfortunately loop
is slow now too, so there was no good way to make a loop like this from about 486 until Sandybridge.
But in 68000:
.
.
loop:
ADDX.W (A0)+, D0 ; both C and X set the same
INC.W D7 ; D7 is loop index
CMP.W #12, D7 ; harms C, but X left intact
BCC loop
Motorola thought they were doing programmers a favor, but the X bit business ended up causing more confusion than it was worth.