История изменений
Исправление Gvidon, (текущая версия) :
Кусочек из исходников:
check-cpu
(pushfd)
(pop eax)
(mov ecx eax)
(xor eax #x200000)
(push eax)
(popfd)
(pushfd)
(pop eax)
(xor eax ecx)
(shr eax 21) ; If bit 21 is set, CPUID instruction is supported.
(and eax 1)
(push ecx)
(popfd)
(test eax eax)
(jz no-long-mode)
(mov eax #x80000000)
(cpuid)
(cmp eax #x80000001) ; Check whether extended function 0x800000001 is available or not.
(jb no-long-mode)
(mov eax #x80000001)
(cpuid)
(test edx ,(ash 1 29)) ; Check whether LM-bit is set or not
(jz no-long-mode)
(ret)
no-long-mode
(stc)
(ret)
Зачем так жить, котаны?
Исходная версия Gvidon, :
Кусочек из исходников:
[code]
check-cpu
(pushfd)
(pop eax)
(mov ecx eax)
(xor eax #x200000)
(push eax)
(popfd)
(pushfd)
(pop eax)
(xor eax ecx)
(shr eax 21) ; If bit 21 is set, CPUID instruction is supported.
(and eax 1)
(push ecx)
(popfd)
(test eax eax)
(jz no-long-mode)
(mov eax #x80000000)
(cpuid)
(cmp eax #x80000001) ; Check whether extended function 0x800000001 is available or not.
(jb no-long-mode)
(mov eax #x80000001)
(cpuid)
(test edx ,(ash 1 29)) ; Check whether LM-bit is set or not
(jz no-long-mode)
(ret)
no-long-mode
(stc)
(ret)
[/code]
Зачем так жить, котаны?