; Assuming condition result is in a flag mov eax, i lea edx, [rax + 1] ; edx = i + 1 cmovnz eax, edx ; if condition != 0, eax = edx mov i, eax #### lea edx, [i + 1] test condition, condition cmovnz i, edx ; conditionally move the incremented value #### xor eax, eax test condition, condition setnz al ; al = (condition != 0) ? 1 : 0 add i, eax ; i += 0 or 1 #### ; If your condition sets the carry flag: adc i, 0 ; i += carry flag