Memory segmentation-microprocessor, Assembly Language

Assignment Help:

Memory Segmentation :

The  memory in an 8086/8088  based system is organized as segmented memory. In this scheme, the whole physically available memory can be divided into a number of logical segments. Each segment is64K bytes in size and is addressed by 1 of the segment registers. The 16-bit contents of the segment register in fact point to the beginning location of a specific segment. To address a particular memory location within a segment, we need an offset address. The offset address is also 16-bit long so that the maximum offset value can be FFFFH, and thus the maximum size of segment is 64K locations.

To emphasize this segmented memory concept, we will take an example of a housing colony containing  say, 100 houses. The easy method  of  numbering  the  houses  will  be  just  to  assign  the numbers from 1 to 100 to each house sequentially. Imagine, now, if 1 wants to find out house number 67, then he will begin from house number 1 and go on till he search the house, numbered 67. Consider another case where the 100 houses are arranged in the 10 x 10 (rows x columns) pattern. In this case, to search house number 67, 1 will directly go to the 6th row and then to the 7th column. In the second scheme, the efforts required for searching the similar house will be too less.  This second scheme in our example is analogous  to the segmented memory scheme, where  the  addresses are specified in  terms of segment addresses analogous tooffset androws addresses analogous to columns.

The CPU 8086 is able to address 1Mbytes of physical memory. The complete1Mbytes memory may be divided into 16 segments, particular of 64Kbytes size. The addresses of the segments can be assigned as 0000H to F000H respectively. The offset address values are from 0000H to FFFFH so that the physical addresses range from 00000H to FFFFFH. In the above case, the segments are called non-overlapping segments. The non-overlapping segments are revealed in given figure (a).However, in some cases, the segments can be overlapping. Imagine a segment begins at a specific address and its maximum size may be 64Kbytes. But, if another segment begins before these 64Kbytes locations of the first segment, the 2 segments are said to be overlapping segments. The region of memory from the start of the second segment to the possible end of the first segment is known as overlapped segment area. Figure tells the phenomenon more clearly. The locations in the overlapped area can be addressed by the similar physical address generated from 2 different sets of segment and offset addresses. The major advantages of the segmented memory scheme are as follows:

1) Allows the memory capacity to be 1Mbytes although the actual addresses to be handled are of 16-bit size.

2) Let the placing of code, data and stack portions of the same program in different parts (segments) of memory, for data and code protection both.

3) Permits a program and/or its data to be put into different areas of memory eachtime program is executed, for instance provision for relocation may be done.

Inoverlapped Area Locations Physical Address = IF+ Cs = IF + CS + denoted the process of physical address formation.

 

912_memory segmentation.jpg

        Fig: Non-overlapping Segments                     Fig: overlapping segment


Related Discussions:- Memory segmentation-microprocessor

Org-proc-assemblers directive-microprocessor, ORG : Origin:- The ORG di...

ORG : Origin:- The ORG directive directs the assembler to begin the memory allotment for the specific segment, code or block from the declared  address in the ORG  statement. W

Internal architecture of microprocessor, Internal Architecture of Microproc...

Internal Architecture of Microprocessor : The architecture of 8086 provides a number of improvements over 8085 architecture. It supports a, a set of 16-bit registers ,16-bit AL

Pointer and index registers-microprocessor, Pointer and Index Registers ...

Pointer and Index Registers The pointers contain offset within the specific segments. The pointers BP, IP and SP generally containoffsets within thedata, code and stack segment

#title:Shifitng of memory, Ask 2. Exchange higher byte of AX and higher byt...

Ask 2. Exchange higher byte of AX and higher byte of BX registers by using memory location 0160 in between the transfer. Then stores AX and BX registers onto memory location 0174 o

Plus and underline , What is the hex for + and - under with a sum involved

What is the hex for + and - under with a sum involved

Comparison between 8086 and 8088, Comparison between 8086 and 8088 All ...

Comparison between 8086 and 8088 All the changes in 8088 above 8086 are indirectly or directly related to the 8-bit, 8085 compatible data and control bus interface. 1) The p

Program to perform one byte bcd addition-assembly program, Program : Write...

Program : Write a program to perform a one byte BCD addition. Solution : It is consider that the operands are in BCD form, but the CPU considers it as hexadecimal and acco

Program help, Could I get an estimate on how much it would cost to write a ...

Could I get an estimate on how much it would cost to write a program in assembly language?

8086 program, program to arrange a given set of numbers in descending order...

program to arrange a given set of numbers in descending order

Into-jmp-unconditional branch instruction-microprocessor, INTO : Interrupt...

INTO : Interrupt on Overflow:- It is executed, when the overflow flag OF is set. The new contents of IP and CS register are taken from the address 0000:0000 as described in INT

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd