check if we are in Pmode

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
Berry

check if we are in Pmode

Post 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?
Moose

RE:check if we are in Pmode

Post 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
common

RE:check if we are in Pmode

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