TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: HERMAN SCHONFELD
from: WIM VELDHUIS
date: 1997-04-28 21:06:00
subject: Video

Herman Schonfeld wrote in a message to Wim Veldhuis:
WV>Herman Schonfeld wrote in a message to Tim Esselens:
 HS> Protected mode is a flat memory model. There are so
 HS> segmentation limits so therefore you can allocate as much
 HS> memory as you want to an object.
WV>This is not correct. In a flat memory model there are still segment
WV>registers. The values in those registers however rarely change during
WV>program execution.
WV>In a 16-bit world this is also possible, but is usually referred to as
WV>the tiny memory model.
WV>Protected mode however is a complete different piece of cake. It has
WV>nothing to do with 32 or 16-bit (It is possible in both) but with the
WV>interpretation of the values in the segment registers. In real mode
WV>these register are actually a part of the actual address. In protected
WV>mode the values in the segment registers are used as index in a
WV>descriptor table, which contains the actual segment adress information
WV>AND the access rights for the segment (hence the name protected mode).
WV>After all, under Windows 3.1 I awfully often got a General Protection
WV>Failure, which is a good indication of protected mode .
 HS> I knew most of that but what do you mean flat mode?
Flat memory model means the segment registers do not alter their value during 
execution of the program. 
 HS> I thought protected mode and flat mode where the same?
No, they are not. In 16-bit real mode, the tiny memory model is a flat memory 
model. Since segments here are only 64K, you reach the ends soon.
 HS> Is flat mode when you switch the cpu into protected and
 HS> change the segment limits then switch back to real mode?
 HS> (making it possible to allocate large segments)
No. 
In protected mode you can have multitasking, here several processes each run 
in their own memory space. They are all running in a flat memory model. A 
device driver, for instance the hard disk driver, must be able to enter all 
those memory spaces, otherwise each proces needs to run its own OS. Device 
drivers are therefore programmed in segmented memory model. A device driver 
sets up the correct segment selectors in order to obtain access to the memory 
space of the processes it is servicing. 
Not every process however can enter another memory space. The protected mode 
scheme prohibits this. Only processes running under the correct priviliges 
can do this trick.
I hope this makes it a little bit more clear.
WV>mvg/wr
WV> 
 HS> Thanks for replying!
 HS> ... !enif tsuj si gnihtyrevE
 HS> ___ Ezycom V1.48g0 01fd016b
 HS>  - Origin: Fox's Lair BBS Bris Aus +61-7-38033908 V34+ Node
 HS> 2 (3:640/238) 
mvg/wr
  
--- timEd/2 1.01.g3+
---------------
* Origin: LightHouse BBS ==> I am a H.U.G.O. Member ! (2:285/324.3)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.