Trying to understand this table - comparator with carry
The simple answer is: compare is set-carry, subtract with carry. The only difference is the result is not stored.

So: Start with carry set, two-complement the compare value, add it to the accumulator value. You are done.