Page 1 of 1

check if we are in Pmode

Posted: Sat Apr 03, 2004 12:00 am
by Berry
Hello,

I'm entering Pmode now, but I would like to make a routine that checks to see if we are realy in Pmode. How can I check this?

RE:check if we are in Pmode

Posted: Sat Apr 03, 2004 12:00 am
by Moose
check the appropriate bit inside the flags that you set to enter pmode. If it is 1, you're in pmode, else your in real mode.

Moose

RE:check if we are in Pmode

Posted: Sat Apr 03, 2004 12:00 am
by common
Do you mean you want to check whether or not you're in a vm86 session?  To check if you're all ready in pmode..

mov eax, cr0
and eax, 1
cmp eax, 0
je  not_in_pmode
; in pmode
...