The Intel 8086 CPU could address up to 1 MB of memory using segmentation, and this CPU have 4 segment registers, which are CS and SS and DS and ES. Each segment in memory can have a maximum size of 64 KB. I want to know what are the possible ways of putting CS,SS,DS and ES in RAM and Are there any specific ways that we could not put CS,SS,DS and ES in RAM? how many of CS,SS,DS and ES can we use in a RAM?
I want to know what are the possible ways of putting CS,SS,DS and ES in RAM
Each of them can point to any location in RAM dividable by 16 (ending in xxxx0).
Since each of them is 16 bits, there are 65536 locations to point them to, resulting in a total of 2^64 possible combinations, right?
Are there any specific ways that we could not put CS,SS,DS and ES in RAM?
They can have any value allowed with 16 bit, so 0..65535. Thus, as mentioned before, each can point to any location within the 2^20 address space were the lower 4 address bits are zero and address the 64 KiB including thereafter.
how many of CS,SS,DS and ES can we use in a RAM?
All 4 are usable to point to, given that they do have dedicated meaning during execution.
It is a research that I am doing and I can't find anything useful in the Internet
Maybe you're simply looking to hard for some secret, where none exists?
A segment is simply 64 KiB of RAM. In case of the 8086 (or any other real mode x86) it starts at the address build from the value the segment register holds times 16. In virtual mode it turns into a handle to a segment descriptor (*1) pointing to a segment of arbitrary size and location defined by the descriptor, but I guess that's another story.
*1 - In fact, even in real mode it's best to think of the content of a segment register as a handle, not an address value ... but that as well may be beyond your question, right?