mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Fix test_long_mode (closes #4)
This commit is contained in:
@@ -125,10 +125,10 @@ test_long_mode:
|
|||||||
cpuid ; CPU identification.
|
cpuid ; CPU identification.
|
||||||
cmp eax, 0x80000001 ; Compare the A-register with 0x80000001.
|
cmp eax, 0x80000001 ; Compare the A-register with 0x80000001.
|
||||||
jb .no_long_mode ; It is less, there is no long mode.
|
jb .no_long_mode ; It is less, there is no long mode.
|
||||||
mov eax, 0x80000000 ; Set the A-register to 0x80000000.
|
mov eax, 0x80000001 ; Set the A-register to 0x80000001.
|
||||||
cpuid ; CPU identification.
|
cpuid ; CPU identification.
|
||||||
cmp eax, 0x80000001 ; Compare the A-register with 0x80000001.
|
test edx, 1 << 29 ; Test if the LM-bit, which is bit 29, is set in the D-register.
|
||||||
jb .no_long_mode ; It is less, there is no long mode.
|
jz .no_long_mode ; They aren't, there is no long mode.
|
||||||
ret
|
ret
|
||||||
.no_long_mode:
|
.no_long_mode:
|
||||||
mov al, "2"
|
mov al, "2"
|
||||||
|
|||||||
Reference in New Issue
Block a user