To gain access to all available memory, and enable all the sophisticated features of the 386, it must run in protected mode. This gives access to 4Gb of memory, virtual memory, separation of user tasks, protection between tasks, privileged instructions, newer 32 bit instructions and a wide range of other features. A segment is a block of memory referenced by a segment register within the processor. Segments may also overlap in memory, and be of different sizes. The DATA segment is used to hold variables and shared data.
Instructions work with one of the defined segments.
As explained, all references to memory are relative to a segment register. Yet, all registers in the 8086 are 16 bit registers. A segment register defines the base address, and another register is used to specify an offset. Lets assume that the register values and memory contents look as follows, 1. Thus the actual memory location referenced is 00102, thus AX ends up with the value 34.