answersLogoWhite

0


Best Answer

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. Data segment (DS) 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. 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. Data segment (DS) 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.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

In the 8086 microprocessor, the Code Segment (CS) register contains the paragraph address that will be added to the Instruction Pointer to obtain the address of the next instruction. Similarly, the Data Segment (DS) register contains the paragraph address that will be added to the Effective Address that is computed to find the address of the data used by that instruction. There are segment override prefixes, but the default use is CS for instructions and DS for data.
'normal' address space in 8086 is 16 bit r which allows it to address 64k of linear memory space. Using segment registers to select a 'bank of memory' the CPU can use much more (20 bit addressing space)

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: A Explain the use of Code Segment CS and data segment DS register in 8086 microprocessor?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why does not Motorola's microprocessor has segment register?

There is insufficient information in the question to properly answer it.  Which Motorola microprocessor are you talking about?  Please restate the question.


How many segment can be directly addressed at a particular time by 8086 microprocessor?

There are four segment registers in the 8086/8088, Code Segment (CS), Stack Segment (SS), Data Segment (DS), and Extra Segment (ES). As a result, there are four segments that can be directly addressed at a particular time, i.e. without an extra instruction to reload a segment register.


What are the different types of segment register?

The code segment (CS) register is used for access to program code. The data segment (DS) register is used for access to data. The extra segment (ES) register is used for access to data during certain string primitive operations. The stack segment (SS) register is used for access to stack data.Any of these implied uses can be overridden with a segment override prefix opcode.


How the Memory Management Unit converts the logical addresses to physical addresses?

In the 8086/8088, the logical address corresponds to a segment register, such as CS (Code Segment), DS (Data Segment), SS (Stack Segment) and ES (Extra Segment). The segment register is selected by context, or it is explicitly selected using a segment override prefix. The segment register is left shifted 4 bits into a 20-bit temporary register. This is the same as multiplying it by 16. Then the logical address is added to that result. The final result is the physical address.


What is the example of segment register?

There are four segment registers on the 8086 and 8088. These are CS (code for code), DS (data segment), ES (extra data segment), and SS (stack segment).


What are the function of segment register?

The segment register in the 8086/8088 provide a base address for any memory access. There are four segment registers, CS - Code Segment, DS - Data Segment, SS - Stack Segment, and ES - Extra Segment. Each in used in the context of a particular instruction and contains the base address of the memory segment divided by 16. This allows the processor to access up to 1 MB of memory, though only in segments of 64 KB at a time.


What is segment in microprocessor?

segment is for converting physical address to logical address , here on taking 8086 microprocessor as example, we have 20 address lines but it is capable of taking only 16 address lines.... so to convert that 20 into 16 segment is used....


Give the segment registers and their corresponding offset registers?

Give the effective address if the segment register is AA03 and the offset register is 0200.


What is program segment prefix in microprocessor?

mujhe nahi aata


What is physical address in 8086 microprocessor?

Physical address in the 8086/8088 is {Selected Segment Register} * 16 + {Effective Offset Address}. It is a 20-bit address .


How segment register are used?

The segment register in the 80806/8088 microprocessor contains the base address (divided by 16) of a region of memory. Since the register is 16 bits in size, there are 65,536 possible segment base addresses, ranging from 00000H to FFFF0H, in increments of 00010H.After address translation at the instruction level, the generated 16 bit offset is added to the selected segment register times 16 to generate a physical address between 00000H and FFFFFH. (If the offset and base go past FFFFFH, they wrap around back to 00000H.) Since the offset is also 16 bits in size, and since the overlap is only 4 bits (times 16), then each 64 kb segment overlaps by 16 bytes.There are four segment registers; CS, DS, ES, and SS, standing for Code Segment, Data Segment, Extra Segment, and Stack Segment.CS is used for opcode fetches. DS is used for normal data. ES is used for certain string operations as the destination address. SS is used for stack and frame (BP) data.The segment registers can be implicitly selected by context, or they can be explicitly selected with a segment prefix opcode.


How many register are located in 8088microprocessor?

there are 14 registers in 8088 micro processor. All the 14 are 16 bit registers. They are4 segment registers viz - code segment register, stack segment register, data segment register, extra segment register.general registers are - accumulator register i.e. AX, base register i.e. BX, count register i.e. CX, data register i.e. DX and stack pointer (SP), base pointer (BP).index registers are - source index(SI), destination index(DI),and the other registers are instruction pointer and flags register.