Why Protected Mode??? 
Author Message
 Why Protected Mode???

I've been reading some pmode code and tutorials but there is still
one question I haven't found an answer to:
Why do I need it in the first place? What benefits are there in
using it? Is it faster, or is it just the improved memory handling?

Hope somebody could enlighten me...

Johan Levin             Sweden
------------------------------



Fri, 04 Jun 1999 03:00:00 GMT  
 Why Protected Mode???

Quote:
> I've been reading some pmode code and tutorials but there is still
> one question I haven't found an answer to:
> Why do I need it in the first place? What benefits are there in
> using it? Is it faster, or is it just the improved memory handling?

> Hope somebody could enlighten me...

I use pmode for the simple reason:  I get access to the 32 bit registers.
That means I can do work on dword sized data, and have access to huge
amounts of ram.  I am using Watcoms Comiler with Dos4GW dos extender.
Memory allocation is simple, speed is good!

Sean



Fri, 04 Jun 1999 03:00:00 GMT  
 Why Protected Mode???

Quote:

> > I've been reading some pmode code and tutorials but there is still
> > one question I haven't found an answer to:
> > Why do I need it in the first place? What benefits are there in
> > using it? Is it faster, or is it just the improved memory handling?

> > Hope somebody could enlighten me...

> I use pmode for the simple reason:  I get access to the 32 bit registers.
> That means I can do work on dword sized data, and have access to huge
> amounts of ram.  I am using Watcoms Comiler with Dos4GW dos extender.
> Memory allocation is simple, speed is good!

> Sean


It is not necessary to use pmode to access 32 bits registers (Though it
is for accessing huge amounts of RAM). And in addition to that a simple
rmode program can still use dword registers for accessing memory, though
only the first 64K of a segment can be accessed.

The things I should use pmode for too, is that it can PROTECT my
program's data and code from being tampered by other programs in the
system (and the other way around of course). Another good reason is that
in protected mode the processor supports hardware context switching
between multiple processes which is done a lot safer and faster than if
you would do that "by hand".



Sat, 05 Jun 1999 03:00:00 GMT  
 Why Protected Mode???

Hi,

Quote:
> I've been reading some pmode code and tutorials but there is still
> one question I haven't found an answer to:
> Why do I need it in the first place? What benefits are there in
> using it? Is it faster, or is it just the improved memory handling?
> Hope somebody could enlighten me...Sure,

Protected mode is the 'native' mode for 286 CPU's and above. It enables
easy and better multitasking and memory management. On 386 CPU's and above
you can also use paging which allows easy and better virtual memory management
(as used with Linux, Win'95, Win'NT and OS/2 2.x+).

DOS is a different story. DOS is written for the 8088. All 80x86 CPU's have
a 8088 compatible mode called 'Real Mode'. In this mode, the 80x86 CPU acts
just as a 8088 (for 99%). It does _not_ imply you can't use other features
than available on the 8088 (like 32-bit instructions/addressing), it just means
you can't use protected mode specific features (multi-tasking, virtual memory).
A very interesting feature of the i386 CPU is the virtual 8086 task (V86).
This allows you to simulate 8088 code without leaving protected mode.
When you combine this, you can create 'DOS' programs which do multi-tasking,
use virtual memory, etc.., but are still able to use BIOS and DOS services,
so you don't have to rewrite these.

On a 286 system, there's another reason to use protected mode. The 286 has no
32-bit instructions and has therefor no direct access to memory above 1MB (+64K)
in Real Mode. In Protected mode, it can use a 24-bit base address for its
segments which makes a 16MB address space.

Herman



Sun, 06 Jun 1999 03:00:00 GMT  
 Why Protected Mode???

Quote:

>I've been reading some pmode code and tutorials but there is still
>one question I haven't found an answer to:
>Why do I need it in the first place? What benefits are there in
>using it? Is it faster, or is it just the improved memory handling?
>Hope somebody could enlighten me...
>Johan Levin         Sweden
>------------------------------


You can access the entire RAM space directly.  This is faster than
using XMS or other calls to copy extended memory to conventional
memory and back to work on it as the copy process is removed.

In real mode, you only have direct access to the first 1MB of memory.

DavMac.
---------------------------------
      DavMac - Sharking!!

---------------------------------



Wed, 09 Jun 1999 03:00:00 GMT  
 Why Protected Mode???

Quote:
> It is not necessary to use pmode to access 32 bits registers (Though it
> is for accessing huge amounts of RAM).

No, it's not neseccary, but when using 32 bit registers in rmode, you
get one 'penalty clock' per use.

Quote:


> > > I've been reading some pmode code and tutorials but there is still
> > > one question I haven't found an answer to:
> > > Why do I need it in the first place? What benefits are there in
> > > using it? Is it faster, or is it just the improved memory handling?

> > > Hope somebody could enlighten me...

> > I use pmode for the simple reason:  I get access to the 32 bit registers.
> > That means I can do work on dword sized data, and have access to huge
> > amounts of ram.  I am using Watcoms Comiler with Dos4GW dos extender.
> > Memory allocation is simple, speed is good!

> > Sean

> It is not necessary to use pmode to access 32 bits registers (Though it
> is for accessing huge amounts of RAM). And in addition to that a simple
> rmode program can still use dword registers for accessing memory, though
> only the first 64K of a segment can be accessed.

--
_____________________________

 Message posted by Joke/dST          


 homepage: http://www.geocities.com/SiliconValley/Heigths/9700/

_________________________________________



Fri, 11 Jun 1999 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Real Mode vs. Protected Mode

2. Funcky Protected Mode Graphical Mouse Cursor in Text Mode

3. Protected Mode / Real Address Mode

4. protected-mode and real-mode

5. Protected mode call in Real Mode

6. switching from protected mode to real mode

7. protect mode and VESA modes

8. real mode vs protected mode

9. real mode or protected mode?

10. protected to real mode switch / also unreal mode

11. Segmented addressing real mode and protected mode

12. Protected mode memory access in real mode problem?

 

 
Powered by phpBB® Forum Software