problem entering again to proteectd mode..

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
asdfgh
Member
Member
Posts: 42
Joined: Fri Apr 18, 2008 9:14 pm

problem entering again to proteectd mode..

Post 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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: problem entering again to proteectd mode..

Post 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
asdfgh
Member
Member
Posts: 42
Joined: Fri Apr 18, 2008 9:14 pm

Re: problem entering again to proteectd mode..

Post by asdfgh »

no.. i dont load a new gdt..
asdfgh
Member
Member
Posts: 42
Joined: Fri Apr 18, 2008 9:14 pm

Re: problem entering again to proteectd mode..

Post 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..
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: problem entering again to proteectd mode..

Post 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
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: problem entering again to proteectd mode..

Post 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.
Post Reply