delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/11/19:46:19

Date: Thu, 11 Dec 1997 16:45:00 -0800 (PST)
Message-Id: <199712120045.QAA12590@adit.ap.net>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Pointer to 0xA000

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019