answersLogoWhite

0

A segment, in the 8086/8088 is a 64kb chunk of memory addressable by any particular value in a segment register. Specifically, there are four segment registers, Code Segment, Data Segment, Stack Segment, and Extra Segment. Each is used in the context of a particular instruction by multiplying the segment register by 16 (left shift 4) and then adding the particular offset contained in the instruction.

This gives access to 1Mb of memory (a 20 bit address bus) using only a 16 bit segment register and a 16 bit offset but, in only one instruction, you only have access to 64kb at a time. It would take two instructions to access any location in memory; one to load the segment register, and one to access the desired location.

Note that, since the segment register is only left shifted by 4, that sequential segments overlap each other at a distance of 16 bytes. Note also that, in the 80386 and higher incarnations of the 8086/8088, that protected mode changed the meaning of a segment register, making it impossible to do simple 1Mb address computations unless you were in Virtual 386 mode or you were in flat 32 bit memory mode. (Almost all modern incarnations run in flat 32 bit mode or flat 64 bit mode, making the concept of segmented addressing obsolete.)

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve

Add your answer:

Earn +20 pts
Q: What is a segment?
Write your answer...
Submit
Still have questions?
magnify glass
imp