User:Combuster/notepad
Jump to navigation
Jump to search
These are my notes from experience. PD code, No warranty etc.
Detecting Emulator
perform DIV test: all common flags are maintained. (0000 08D5)
PUSHF POP EAX ; either clear flags for first test, or set flags for second test. pick one: ; AND AX, (0xffff - 0x8D5) ; OR AX, 0x8D5 PUSH EAX MOV AX, 5 MOV CL, 2 POPF DIV CL PUSHF POP EAX AND EAX, 0x8D5 ;AX contains signature
in 16-bit mode, use ax instead of eax
Multiprocessor Bochs
in bochs you have to write MSR_APICBASE before the APIC becomes accessible even though the register already has the correct value