1 2 3 4 5 6 7 8 9 10 11 12 13
#include <stdio.h> int main() { unsigned char idtr[6]; asm("sidt %0" : "=m" (idtr)); if(0xff==idtr[5]) { return 0; } else { return 1; } }