I disassembled _cphlde ($403c) to find out which flags are set. I'm not sure how the carry flag is affected, but you can use the sign flag to check for inequalities: call _cphlde jr z,de_equal_to_hl jr p,de_less_than_hl jr m,de_greater_than_hl