; Extend DE to HLDE LD H, D LD L, E ADD HL, HL ; Move sign bit into carry flag SBC HL, HL ; HL is now 0 or 11111111 11111111, depending on the carry