home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!ee0n+
- From: ee0n+@andrew.cmu.edu (Eric James Ewanco)
- Newsgroups: comp.os.ms-windows.programmer.win32
- Subject: Windows 3.1 & Processor Mode Swap
- Message-ID: <Iegd38G00WB98APb1X@andrew.cmu.edu>
- Date: 12 Sep 92 16:52:24 GMT
- Article-I.D.: andrew.Iegd38G00WB98APb1X
- Organization: Carnegie Mellon, Pittsburgh, PA
- Lines: 35
-
- Hi. I've been having a discussion with someone about WInodws over DOS, and I
- had some questions about how Windows behaves when DOS and BIOS calls are made.
-
- Suppose a Win32 application mades a DOS call First, does the trap go into
- Windows in Protected mode, or into DOS (in 21h)? I assume it goes into Windows
- and stays in protected mode. When Windows executes the call, what processor
- mode does it go into when it transfers to DOS? Real mode (i.e. it switches out
- of protected mode) or virtual 8086 mode? When DOS executes, does Windows
- maintain memory and I/O protection, or is the machine unprotected when it
- executes the DOS call? For example, let's say I did a DOS call that causes
- other process memory to be mangled (assuming it's in the lower 640k) -- will it
- be mangled or will Windows trap? Now DOS, as it is wont to do, will often call
- BIOS in the execution of a call. Will this 1) Trap into protected mode,
- Windows code, which Windows will then switch into real/virtual 8086 code before
- it makes the actual bBIOS call; 2) Trap into the BIOS directly in real mode?
-
- Hence, the big question, how many times does Windows switch between real and
- protected mode (protected and virtual 8086?) in a Win32 DOS call? Six is my
- guess.
-
- Next question, related: what happens when a DOS program does a DOS call? Does
- the processor switch to protected mode, and then do what a Win32 program does?
- Or does it run in virtual 8086 mode all the way?
- Does a similar process happen with a Win32 or DOS program calls BIOS?
-
- Final question: DOS is still non-reentrant under Windows, right, so only one
- DOS call may be executing at any given time?
-
- Basically I am trying to convince someone that Windows NT will be much more
- efficient and less crash-prone than Windows on top of DOS. I am trying to show
- how awkward DOS compatibility makes Windows execution.
-
- Thanks for the help in understanding.
-
- Eric
-