Search code examples
memorymemory-addresscpu-registersx86-16segment

If the CS register of a 8086 has the value 0xA000, what is the range of the physical addresses of the associated segment?


As the title already says, I want to know what the range of the physical addresses of the associated segment is, if the CS register of a 8086 has the value 0xA000?


Solution

  • Shift left 4 bits.

    0xa0000 + whatever value is hqving CS applied.

    Since the cpu registers and other values are 16-bit, you get 0xAxxxx where xxxx is a 16 bit value. That is, the segment register specifies which 64k can be addressed. By windowing like that, you can get a 20-bit physical addresss space.

    See this old post for more info. Once upon a time that was common teaching, but I suppose now it's harder to find. Maybe you can find some old books via Amazon Marketplace.