I wanted to ask how to know (with what kind of code) if right now my bootloader has loaded in real mode or protected mode? For example, I want to print out A, if I'm already in proteced mode. Can anyone give me a code example or maybe theres another method with whom I can get the desired effect.
Sat Mar 06, 2010 8:34 am
Kieran
Site Admin
Joined: Sat Jul 25, 2009 7:44 am Posts: 274 Location: United Kingdom
Re: how to know if i'm in proteced or in real mode
I wont give code, but using ASM or C, you can check for the relevant 1 Bit flag in CR0.
_________________ Thank you for reading,
Kieran C G Foot
Sat Mar 06, 2010 10:02 am
XanClic
Joined: Thu Jan 07, 2010 4:46 am Posts: 5
Re: how to know if i'm in proteced or in real mode
But you must make sure that the code is the same both in 16 and 32 bit mode.
Sun Mar 07, 2010 4:23 pm
Sharpner
Joined: Wed Feb 10, 2010 6:32 am Posts: 26
Re: how to know if i'm in proteced or in real mode
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum