Mail Archives: djgpp/1997/12/11/19:46:19
At 04:16 12/10/1997 -0600, Ryan McGee wrote:
>What exactly does _dos_ds do though? Whats the difference between a
selector and
>a sector?
_dos_ds is a selector which is mapped to conventional memory.
A selector and a sector??? Okay, little mini protected-mode tutorial.
A selector is the method by which you access protected-mode segments. In
protected mode, a segment can be of arbitrary size and can reside at an
arbitrary location in memory. A selector is a 16-bit value which corresponds
to a particular segment.
In DJGPP, the segment you work in most of the time starts somewhere above 1M
and is only as large as your data space, preventing out-of-bounds accesses.
To access outside this, you need to use another selector. _dos_ds is an
example of this.
A sector, however, is a block of data on a disk drive and is usually 512
bytes in size. There is no relation at all.
You might consider looking for a protected mode tutorial on the net
somewhere. Anybody know of a good one?
Nate Eldredge
eldredge AT ap DOT net
- Raw text -