|
|
Question : Problem: Paragraph Boundary
|
|
I am not very clear on the concept of the paragraph boundary. They say each program segment start at the paragraph boundary ( evenly divisible by 16 or hex 10 ). I don't understand what they mean? I know that they would contain addresses divisible by 16 eg 32, 48, 64 etc but don't know more than that. Could anyone elaborate on that please?
|
Answer : Problem: Paragraph Boundary
|
|
Well, if this is what I think it is, here's what's going on.
The CPU you're dealing with has a segmented memory architecture. That is, addresses are built up from segment or index registers and an offset address. The segment/index register is usually shifted up and the offset added to it. In some architectures, there's no bit overlap and in others there is. Segmented architectures are just one way to address more memory than you have address bits.
What you're referring to is a CPU with a segment register that shifts up 4 bits and hence all the "base" addresses end in hex 0. Assuming that you have more than 4 bits available to you in the offset address, then you can (in some architectures) end up in the interesting state in which you can address the same bytes of physical memory with many differing combinations of segment and offset (add one to the segment, subtact 16 from the offset, etc).
So, an example, segment register contains 1234 hex, offset is abc hex. This refers to (1234 hex * 10 hex) + abc hex = 12340 hex + abc hex = 12dfc hex. Which you could also address with a segment register of 1233 hex and an offset of acc hex. This 16 byte block is sometimes called a paragraph and the address may be written as segment:offset or 1234:0abc in this case.
Note that there are many other possibilities for segmented architectures, as well as completely different solutions other than segmented.
|
|
|
|