Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Dynamic library structure.

For a good understanding of how the program works in assembly language, you need to be very clear about the organization of the segments. With respect to the processors Intel Pentium term "segment" has two meanings:

 

Field predetermined physical memory size. For 16-bit processors the size of physical memory segment can not exceed 64 KB, while the 32-bit can be up to 4 GB.

The memory area of ​​variable size, which may be code, data, or stack.

Physical segment can be located only at a multiple of 16, or, as some say, on the boundary. Logical segments are closely connected with the physical. Each logical segment of the assembler program defines a named area of ​​memory that is addressed to segment selector contained in a segment register. The segmented architecture creates difficulties in the software development process. For small programs smaller 64K, program code and data may reside in separate segments, so no particular problem arises.

 

For large programs that span multiple segments of code or data, you need to properly address the data in the different segments of the data. In addition, if the code exists in several segments, it complicates the implementation of branching in the program, as well as procedure calls. In all these cases, the need to set the address as a segment: offset.

 

When a 32-bit protected mode these problems disappear. For example, the flat memory model (of which we will discuss later) to address the program code and data is sufficient 32-bit effective address within the contiguous area of ​​memory.

 

Logical segments contain three main components of the program: the program code, data, and stack. Macro assembler MASM provides the correct mapping of these components on the physical memory segments, with segment registers CS, DS and SS contain the addresses of physical memory segments.

 


Date: 2015-01-29; view: 1065


<== previous page | next page ==>
Ways of addressing. | File systems. Characteristics of files.
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.007 sec.)