Page 1 of 1

V86 mode

Posted: Fri Jan 11, 2002 12:00 am
by chatamballi
Hi everyone,
I've been trying to execute a V86 task for some
time. This is what I tried -

1. I had a piece of code under [BITS 16] block in
my protected mode code.
2. Made a code selector entry in the GDT pointing
to the 16bit code.
3. Created a TSS pointing to the 16BIT code.
The VM bit in the EFLAG slot was set.
4. Made a TSS selector entry in the GDT pointing
to the TSS.

but jumping in to the TSS selector simply reboots
my computer. Is there anything I am missing out?!!

I will greatly apprecite if someone can help.
regards,
Chatamballi

RE:V86 mode - confirmation?

Posted: Fri Jan 11, 2002 12:00 am
by J. Weeks
>On 2002-01-11 04:12:14, chatamballi wrote:
>Hi everyone,
>I've been trying to execute a V86 task for some
>time. This is what I tried -
>
>1. I had a piece of code under [BITS 16] block in
> my protected mode code.
>2. Made a code selector entry in the GDT pointing
> to the 16bit code.
>3. Created a TSS pointing to the 16BIT code.
> The VM bit in the EFLAG slot was set.
>4. Made a TSS selector entry in the GDT pointing
> to the TSS.
>
>but jumping in to the TSS selector simply reboots
>my computer. Is there anything I am missing out?!!

First off... I don't know much about v86 mode, so
you might want to get some confirmation on the
following :)

My understanding, though, was that V86 mode doesn't
necessarily equate to "emulate 16 bit programs."
In other words, I don't think it jumps to real
mode for you... you have to do that yourself.

You can use V86 mode to emulate 32-bit pmode
programs too, so I think if you're wanting to
emulate a 16-bit real mode OS, you'll have to
set up the environment first.

Jeff

ps - I say "emulate", but you know what I mean :)

RE:V86 mode - confirmation?

Posted: Fri Jan 11, 2002 12:00 am
by Guest
Hi jeff,

>My understanding, though, was that V86 mode doesn't
>necessarily equate to "emulate 16 bit programs."
>In other words, I don't think it jumps to real
>mode for you... you have to do that yourself.
>
>You can use V86 mode to emulate 32-bit pmode
>programs too, so I think if you're wanting to
>emulate a 16-bit real mode OS, you'll have to
>set up the environment first.
>


From all the docs that I went through, I got the
idea that V86 stands for virtual 8086...I cannot
really understand why I would use a special mode
in protected mode to execute 32 bit code...

RE:V86 mode - confirmation?

Posted: Mon Jan 14, 2002 12:00 am
by J. Weeks
>From all the docs that I went through, I got the
>idea that V86 stands for virtual 8086...I cannot
>really understand why I would use a special mode
>in protected mode to execute 32 bit code...
>

Because when you're emulating a crappy OS like
Win95, you're gonna want some security! Try an
execute a cli intruction under Win95. It works.

As a general rule, if you're emulating an OS with
less security then your own, you're gonna want to
emulate it in v86 mode, in my opinion.

Jeff