Lord Loh.
Full Member level 4
Segment:Offset
In 16 bit machines that have 20 bit address bus, the memory is supposed to have been divided into several segments having offsets of 0 through 65535.
This is supposed to hvae been done to store 20 bit address into two 16 bit registers.
A book that I have says :
The example makes me feel that each segment is of 16 bytes!!! Could the example probably be wrong ?
As per calculations. 20 bit address bus give a maximum addressable locations of 1MB. 16-bit address gives 64Kb.
Therfore there ought to be 16 segments each consisting of 64 Kb.
16 seg * 64Kb = 1024kb
What do I understand this as ?
In 16 bit machines that have 20 bit address bus, the memory is supposed to have been divided into several segments having offsets of 0 through 65535.
This is supposed to hvae been done to store 20 bit address into two 16 bit registers.
A book that I have says :
Writing TSRs Through C by Yashwant Kanitkar said:...However in 16-bit registers the maximum value that can be stored is 65,535. Then how do we access the locations beyond the 65,535th byte? By using two registers (segment and offset) in conjunction. For this the total memory (1MB) is divided into a number of units each comprising of 65,536 locations. Each such a unit is called a segment. Each segment always begins at a loation number that is exactly divisible by 16. The segment register contains the address of where the segment begins wheras the offset register contains the offset of the data/code from where the segment begins. For example the number contained in the segment register is 2 and that in the offset register is 5, the address of the data/code will be (16*2)+5=37
The example makes me feel that each segment is of 16 bytes!!! Could the example probably be wrong ?
As per calculations. 20 bit address bus give a maximum addressable locations of 1MB. 16-bit address gives 64Kb.
Therfore there ought to be 16 segments each consisting of 64 Kb.
16 seg * 64Kb = 1024kb
What do I understand this as ?