Commit ed95d5f7 by malcolm

Attempted fix. A tiny bit better.

parent 0a7e2777
Showing with 17 additions and 10 deletions
...@@ -114,22 +114,29 @@ Main: ;main section ...@@ -114,22 +114,29 @@ Main: ;main section
int 0x15 int 0x15
;; now to try protected mode... ;; now to try protected mode...
cli cli
lgdt [gdtinfo] lgdt [gdt]
mov eax, cr0 mov eax, cr0
or al, 1 or al, 1
mov cr0, eax mov cr0, eax
jmp 08h:PMain jmp 08h:PMain
gdtinfo: gdt:
dw gdt_end - gdt - 1 ;last byte in table
dd gdt ;start of table times 16 db 0
dw 0xffff ; segment limit
gdt dd 0, 0 .src:
flatdesc db 0xff, 0xff, 0, 0, 0, 10010010b, 11001111b, 0 dw 0
gdt_end: db 2
db 0x55 db 0x93 ; data access rights
db 0xAA dw 0
dw 0xffff ; segment limit
.dest:
dw 0
db 0x10 ; load protected-mode kernel to 100000h
db 0x93 ; data access rights
dw 0
times 16 db 0
PMain: PMain:
nop nop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment