real & protected 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
sysprogrammer

real & protected mode

Post by sysprogrammer »

How can we switch to real mode to execute real mode code under windows?
carbonBased

RE:real & protected mode

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

RE:real & protected mode

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

RE:real & protected mode

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

RE:real & protected mode

Post by Khumba »

You could create a shortcut (.PIF file) for the program and force the user to run it in DOS mode.
carbonBased

RE:real & protected mode

Post by carbonBased »

that still results in VM86 mode in most (all?) forms of windows, though... despite what it looks like
Post Reply