Flat memory mode, segmented memory mode, and real address mode

Source: Internet
Author: User

The IA-32 processor platform allows three different methods to access the system memory:

(1) flat memory mode

(2) segmented memory mode

(3) real address mode

In flat memory mode, all system memory is represented as a continuous address space. All commands, data, and stacks are included in the same address space. Access each memory location through a specific address called a linear address.

In the segmented memory mode, the system memory is divided into independent segments and referenced by the pointer in the segment register. Each segment is used to contain specific types of data. One segment is used to contain the instruction code, the other segment is used to contain data elements, and the third segment is used to contain the program stack.

The memory location in the segment is defined by the logical address. The logical address consists of the segment address (stored in the segment register) and the offset address. The processor converts the Logical Address to the corresponding linear address location to access the memory bytes.

If the program uses the real address mode, all segment registers point to a zero linear address and will not be changed by the program. All script codes, data elements, and stack elements are directly accessed through their linear addresses.

Excerpt from: Assembly Language Programming by Richard Blum

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.