Everything is included in the KERNEL's pre startup section through include files. (its an all assembly kernel) activate A20 is called and returns. Then enable_pmode is called and it fails. I tried putting all the enable_pmode code in the kernel so there is no call but it gives the same error. To exit the call and to start the Kernel I use jmp 08h:Kernel
This is my actual code to activate pmode:
Code: Select all
CLI
LGDT [GDTR]
MOV EAX, CR0
OR AL, 1
MOV CR0, EAX
JMP 08h:PModeMain
Thanks in advance.