switch to v86 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
lama
Member
Member
Posts: 83
Joined: Thu Apr 16, 2009 8:41 am

switch to v86 mode

Post by lama »

hi all,
another lame question: i'm unable to set vm flag and i dont know why.so, i invoke interupt,eflags are pushed onto stack.then i 'or' memory containing eflags.but when this eflags are poped back to its register, vm bit is still untouched.i know that i'm doing something terribly wrong, so can anyone please show me ho to do that?
thanks
Martijn
Posts: 22
Joined: Tue Feb 26, 2008 3:43 am
Location: The Netherlands

Re: switch to v86 mode

Post by Martijn »

Get yourself a copy of the Intel manuals. They explain everything you need to know. ;)
Intel 3A: 15.2.1 Enabling Virtual-8086 Mode
The processor runs in virtual-8086 mode when the VM (virtual machine) flag in the EFLAGS register is set. This flag can only be set when the processor switches to a new protected-mode task or resumes virtual-8086 mode via an IRET instruction.
System software cannot change the state of the VM flag directly in the EFLAGS register (for example, by using the POPFD instruction)
Post Reply