Code: Select all
#include <stdio.h>
int bit = 0x80000;
unsigned char bits[0x80000/8 + 1] = { 0 };
bool func_vmp() {
unsigned char r;
__asm {
mov ecx,[bit]
bt word ptr [bits], cx
setc [r]
}
return r;
}
bool func() {
unsigned char r;
__asm {
mov ecx,[bit]
bt word ptr [bits], cx
setc [r]
}
return r;
}
int main() {
bits[0x80000/8] = 0xFF;
printf("%d\r\n", func_vmp());
printf("%d\r\n", func());
return 0;
}