Aracılığıyla paylaş


_bittestandcomplement, _bittestandcomplement64

Microsoft'a Özgü

adresinin abitini b inceleyen bir yönerge oluşturun, geçerli değerini döndürür ve biti tamamlayıcısına ayarlar.

Sözdizimi

unsigned char _bittestandcomplement(
   long *a,
   long b
);
unsigned char _bittestandcomplement64(
   __int64 *a,
   __int64 b
);

Parametreler

A
[in, out] İncelenmesi gereken belleğe bir işaretçi.

B
[in] Test için bit konumu.

Dönüş değeri

Belirtilen konumdaki bit.

Gereksinimler

Içsel Mimari
_bittestandcomplement x86, ARM, x64, ARM64
_bittestandcomplement64 x64, ARM64

intrin.h üst bilgi dosyası<>

Açıklamalar

Bu yordam yalnızca iç yordam olarak kullanılabilir.

Örnek

// bittestandcomplement.cpp
// processor: x86, IPF, x64
#include <stdio.h>
#include <intrin.h>

#pragma intrinsic(_bittestandcomplement)
#ifdef _M_AMD64
#pragma intrinsic(_bittestandcomplement64)
#endif

int main()
{
   long i = 1;
   __int64 i64 = 0x1I64;
   unsigned char result;
   printf("Initial value: %d\n", i);
   printf("Testing bit 1\n");
   result = _bittestandcomplement(&i, 1);
   printf("Value changed to %d, Result: %d\n", i, result);
#ifdef _M_AMD64
   printf("Testing bit 0\n");
   result = _bittestandcomplement64(&i64, 0);
   printf("Value changed to %I64d, Result: %d\n", i64, result);
#endif
}
Initial value: 1
Testing bit 1
Value changed to 3, Result: 0
Testing bit 0
Value changed to 0, Result: 1

END Microsoft'a Özgü

Ayrıca bkz.

Derleyici iç bilgileri