Quantcast
Channel: x86 Assembly - Programmers Heaven
Viewing all articles
Browse latest Browse all 152

need help Swithcing to real mode and back to protected mode CONFUSED??

$
0
0
I am taking an upper level class in microprocessor architecture and interfacing. I need to write a program that demonstrates the real and protected modes of the pentium processor. The program must start in protcted mode, then switch to real mode, and finally return back to protected mode. I have obtained many resources on this, but I am still a bit confused. The program can be written in C/C++, or asm, or a combination of both. I haven't had much luck finding any purely C resources for switching between modes. BTW I haven't worked with Masm in about 3 years, so I am rusty. I have also never had to switch modes.

using
computer:
AMD k6/233
win 98 OS

Dev tools:
MASM611
Visual c++ 6.0


My computer is running windows 98. From what I understand DOS mode in win98 is a shell program and emulates dos via Virtual86 mode (even if i restart in Dos mode?? right?). Since I do not actually have dos 6.22 installed:

Is it possible to access 'real mode'?

Most of the tutorials expect starting in real mode.

How can I amke sure that my processor is running in real mode?

Even if I use 16 bit addresses and segments under the dos shell, aren't I still in v86 mode?

If I write my assembly program using .386p and a C flat memory model I assume that I am starting out in protected mode. Is there any easy way to switch to real mode by just changing cr0. Most of the tutorials set up a global discriptor table, and a logical discriptor table.

Also must I remove emm386 from loading? Should it load NOEMS? When i tried this I couldn't run PWB. So should i write the code under PWB and then run it without emm386 loaded. I am so confused??????

Any and all help is appreciated



Viewing all articles
Browse latest Browse all 152

Latest Images

Trending Articles



Latest Images