Last updated on August 28th, 2020 at 03:45 pm
Purposed of Segment Registers
CS (Code Segment)
Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions.
Stack segment (SS)
Stack segment is a 16-bit register containing address of 64KB segment with program stack. By default, the processor assumes that all data referenced by the stack pointer (SP) and base pointer (BP) registers is located in the stack segment. SS register can be changed directly using POP instruction.
Data segment (DS)
Data segment is a 16-bit register containing address of 64KB segment with program data. By default, the processor assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in the data segment. DS register can be changed directly using POP and LDS instructions.
Extra segment (ES)
Extra segment is a 16-bit register containing address of 64KB segment, usually with program data. By default, the processor assumes that the DI register references the ES segment in string manipulation instructions. ES register can be changed directly using POP and LES instructions.
It is possible to change default segments used by general and index registers by prefixing instructions with a CS, SS, DS or ES prefix.
IP (Instruction Pointer)
To access instructions the 8086 uses the registers CS and IP. The CS register contains the segment number of the next instruction and the IP contains the offset. IP is updated each time an instruction is executed so that it will point to the next instruction. Unlike other registers the IP can’t be directly manipulated by an instruction, that is, an instruction may not contain IP as its operand.
Next Read:
good explanation..
I hope that it helped…
i finally found the answer
Really glad to know that and thanks for inspiring with a comment as now I know my notes are helping people.
good job my friend
Thanks For Leaving your comments, these comments inspires me a lot…
Thanks Tanmay for your online help and guidance…
Thanks for your help Tanmay…
Glad to know that people are getting helps from my class notes. Miss those days a lot …
Welcome …again …
tnmay brother i want to talk with u.. have u skype id???
Write here in comments, I will listen. I don't use skype.
thanks tanmay…u have used a very simple language so that v have understood well…
Goo to know that these are helping others …
brilliant explanation
thanks .its a good explanation…..
can u expalin cs and ap briefly
Thanks.
Thanks.
Left study 4 years … can't dig all these again …
Helped a lot thank you so much ….
Well explained..it boosted my confidence