Page 1 of 1
problem entering again to proteectd mode..
Posted: Sat Jul 05, 2008 8:43 am
by asdfgh
i use bochs,,
fdirectly go to protected mode..
then go back to real mode...
but when i again enable
a20 lines and set cr0 first bit to 1
i get triple fault..
and how to swithc to virtual mode.. code please.
Re: problem entering again to proteectd mode..
Posted: Sat Jul 05, 2008 12:21 pm
by AJ
Hi,
IIRC, the multiboot specification tells you not to rely on the value of GDTR or the state of the GDT. For this reason, are you loading a completely new GDT when you switch back to PMode? Other than that, code please.
As for v86 mode, you need to have multitasking set up and set VM in the new task's EFLAGS register. The only other addition you need to make is adding the 16 bit segment registers to the bottom of the new task's stack. Have you already got multitasking?
Cheers,
Adam
Re: problem entering again to proteectd mode..
Posted: Sat Jul 05, 2008 9:46 pm
by asdfgh
no.. i dont load a new gdt..
Re: problem entering again to proteectd mode..
Posted: Tue Jul 08, 2008 6:27 am
by asdfgh
i set protected mode bit to 0 and disable th a20 gate..
i go to real mode..
what should i do to come back to protected mode..
Re: problem entering again to proteectd mode..
Posted: Tue Jul 08, 2008 7:13 am
by jal
asdfgh wrote:i set protected mode bit to 0 and disable th a20 gate..
i go to real mode.. what should i do to come back to protected mode..
You really should read the
forum rules. You display a complete lack of any understanding of the subject. First, acquire knowledge, then, come back.
JAL
Re: problem entering again to proteectd mode..
Posted: Tue Jul 08, 2008 4:11 pm
by pcmattman
and how to swithc to virtual mode.. code please.
No. I'm not giving up time to give you code that you most likely won't understand at all just because you said please. Google, read the wiki, RTFM.