Page 1 of 1

real & protected mode

Posted: Sat Dec 27, 2003 12:00 am
by sysprogrammer
How can we switch to real mode to execute real mode code under windows?

RE:real & protected mode

Posted: Sun Dec 28, 2003 12:00 am
by carbonBased
You can't.

However, any code executed inside a DOS prompt, in windows, is executed inside a VM86 handler.  It's not real mode "exactly" but as far as your DOS app is concerned, it is.

RE:real & protected mode

Posted: Sun Dec 28, 2003 12:00 am
by sysprogrammer
yeah, i know that working inside windows on DOS prompt is not real mode but virtual 8086 mode becsause its is not dos it is session window.Thats why i m trying to switch to exactly REAL mode.

RE:real & protected mode

Posted: Sun Dec 28, 2003 12:00 am
by carbonBased
You can't.

It's a priveleged instruction, and any self respecting OS won't allow user level applications to alter CR0.

You only choices are to install DOS, or run it in a virtual machine.

Cheers,
Jeff

RE:real & protected mode

Posted: Wed Dec 31, 2003 12:00 am
by Khumba
You could create a shortcut (.PIF file) for the program and force the user to run it in DOS mode.

RE:real & protected mode

Posted: Wed Dec 31, 2003 12:00 am
by carbonBased
that still results in VM86 mode in most (all?) forms of windows, though... despite what it looks like