answersLogoWhite

0


Best Answer

The Code Segment (CS) register cannot be used as a destination because that is the way Intel designed it. Think about it. If you could load CS directly, the consequence would be that you would lose control of the processor because now the Instruction Pointer (IP) register would be wrong. In order to change the value of CS, you also have to simultaneously change the value of IP. You do that with an intersegment call or jump, an interrupt, or a return.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why code segment cannot be used as destination?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which three fields are used in a UDP segment header?

• checksum • destination port • source port


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.


Difference between code segment and data segment of an instruction?

In the 8086/8088 microprocessor, the code segment is used to fetch the opcode and any additional instruction bytes that might be part of the instruction, while the data segment is used to fetch and/or store any operand bytes that the instruction requires to be manipulated.This is in the case of no segment override prefix.


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.


Define the extra segment and stack segment?

The extra segment in the 8086/8088 is a 64kb region of memory that is indexed by the displacement address of the destination of certain string operations, relative to DI. Contrast that with the data segment, which is a 64kb region of memory that is indexed by the displacment address of the displacement of most operand addresses. The stack segment is similar, but it is used for stack oriented data, relative to SP or BP.


Can old Microsoft point code be used again?

After you use a Microsoft point code once, it cannot be used again.


What is the command used to configue a static route for a router?

ip route {destination prefix} {destination prefix mask} {interface OR forwarding router's IP address}


Can a Lego MBA code be used more than once?

No, a Lego MBA code cannot be used more than once.


What part of a packet is used to get to destination?

Destination address


What is flat memory model?

A program written in native 32 bit Windows format is created in what is called FLAT memory model that has a single segment, which contains both code and data. Such programs must be run on a 80386 or higher processor. Differing from earlier 16-bit code that used combined segment and offset addressing with a 64 Kb segment limit, FLAT memory model works only in offsets and has a range of 4 Gigabytes. This makes assembly code easier to write and the compiled (assembled) code is generally a lot faster than the equivalent 16-bit code. All segment registers are automatically set to the same value with the flat memory model. This means that segment / offset addressing must NOT be used in 32-bit programs that run in 32-bit Windows operating systems. For programmers who have written code in DOS, a 32-bit Windows PE (executable) file is similar in some respects to a DOS COM file - they have a single segment that can contain both code and data and they both work directly in offsets. That is, neither uses segment / offset addressing. Flat-model assembler code defaults to NEAR code addressing and NEAR data addressing within the range of 4 gigabytes. The FS and GS segment registers are rarely (if ever) used in application programs but may be used in some instances by the operating system itself.


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 used to connect different devices but cannot filter or segment traffic?

Probably a switch, but many switches have VLAN and Firewall capabilities today.