Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the type and function of the computer mid-segment register?

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the type and function of the computer middle register, which is very detailed and has a certain reference value. Interested friends must finish reading it!

The segment register is set because of the segmented management of memory. The computer needs to segment memory to be allocated to different programs (similar to hard disk paging). When describing memory segmentation, you need the following information: 1. The size of the segment; 2. The starting address of the segment; 3. Administrative attributes of the section (write prohibited / execution prohibited / system specific, etc.). This information needs to be stored in 8 bytes (64 bits), but the segment register has only 16 bits, so the segment number (segment selector) can only be stored in the segment register, and then mapped to GDT (global (segment) descriptor table) in memory to read the segment information.

Segment register: in the 8086 system, the address code for accessing memory consists of two parts: the segment address and the intra-segment offset address. Segment registers are used to store the logical base values of each segment and indicate the four logical segments currently in use, including code segment register CS, stack segment register SS, data segment register DS and additional segment data register ES.

Types and functions:

1. Code snippet register CS (Code Segment)

The base address of the segment in which the program code is currently running is stored, indicating that the currently used instruction code can be obtained from the memory segment specified in the register, and the corresponding offset is provided by IP.

2. Data segment register DS (Data Segment)

Indicates the lowest address of the segment where the data used by the current program is stored, that is, the base address of the segment where the segment is stored.

3. Stack segment register SS (Stack Segment)

Indicates the bottom address of the current stack, that is, the segment base address where the stack segment is stored.

4. Additional segment register ES (Extra Segment)

These are all the contents of this article entitled "what are the types and functions of computer registers?" Thank you for your reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report