简体   繁体   中英

Segment Offset Pair bs Segment Descripter

I am little confused to understand the difference between a segment offset pair in 8088 for physical address calculation as compared to segment descriptors in 32 bit processor.

Any explanation would be highly appreciated.

16 bit CPUs could only address 64kB of memory. To extend the memory range, segments were introduced wich basically define the base adress of a 64KB window in the pchyscak available memory.

To get the pyhscial address such a pointer is pointing to, you have to multiply the segment value with 10h (16) and add the offset adress. ie. If you have an adress like

145A:67B1

 145A0   (+10h or << 4)
+ 67B1
------
 1AD51   <- Physical memory address

A protected mode descriptor is similar to such a segment, but with additional information. It has a length which can be up 1-64KB (x286), and information about the prvilige level and presence. The privilege level is used to make the OS more secure and indipendent from the user space, the presence flag is for virtual memory.

On the 386 the ranges were extended so a segment can now be up to 1MB and a granularity was added so that a segment is now a multiple of a 4096 block, thus extending the segment size up to 4GB.

Another property in the descriptor is to set a segment to 16 or 32 bit mode, so that 16 code can still work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM