Added snippet to detect Bochs.
This commit is contained in:
16
bochsdet/bochsdet.c
Normal file
16
bochsdet/bochsdet.c
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
unsigned char Result;
|
||||||
|
outportb (0x80, 0xFF);
|
||||||
|
Result = inportb (0xE9);
|
||||||
|
if (Result == 0xE9)
|
||||||
|
{
|
||||||
|
printf("Bochs detected.\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("Bochs not detected.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user