this is my simple code which disabled paging and leaves everything else the same..
Code: Select all
mov eax,CR0
and eax,0x7FFFFFFF
mov CR0,eax
hlt
and the code in my bootloader is this and it works fine!
Code: Select all
mov eax, CR0 ;Turn on paging and protected mode
or eax, 0x80000001
mov CR0, eax