SEC, short for SEt Carry, sets the 6502 processor’s carry flag. Place it before SBC when subtracting two 8-bit numbers: SBC subtracts the source from register A and subtracts one more when the carry flag is clear. section 4.1.2
Listing 4.9 Subtracting a value from the A register
sec #1 sbc <source>
Use SEC immediately before SBC to prepare the carry flag for subtraction. section 4.1.2
Subtracting a direct value
With A equal to $06, SEC followed by SBC #$05 leaves A equal to $01. section 4.1.2
