All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hendrik Visage" <hvjunk@gmail.com>
To: Frank Kotler <fbkotler@verizon.net>
Cc: A D <a_d_249@hotmail.com>, linux-assembly@vger.kernel.org
Subject: Re: Segment override and lldt instruction
Date: Tue, 5 Jun 2007 01:52:33 +0200	[thread overview]
Message-ID: <d93f04c70706041652k3be549bs8140489a8abbe0b6@mail.gmail.com> (raw)
In-Reply-To: <465E1AC6.2020906@verizon.net>

On 5/31/07, Frank Kotler <fbkotler@verizon.net> wrote:
> A D wrote:
> > Hi! I have couple of questions regarding gnu assembly. I've heard the word
> > segment override. Where segment register can be manually overriden. so
<snip>
> > But I get segmentation fault error. How can i do it without error?
>
> Use a valid selector. You appear to have "heard about" some 16=bit real
> mode stuff that is not true in protected mode. Take a look here:
>
> http://my.execpc.com/~geezer/johnfine/segments.htm

Nice technical discussions ;)

> In "Linux assembly", there is no reason you'd *want* to use a segment
> override, or alter a segment register.

Not while your program and/or data space  fits in 4GB of memory space ;)

Okay, a "perhaps" easier explanation on the differences between
protected and real mode segment registers (Strange I don't recall this
term in SPARC assembly...)

In Realmode, a segment register basically points to the "bottom"/base
of a 2^16 address space. The actuall address is/was calculated as
Segment register*4+register. This does allow for fancy/interesting
wrap around sitautions at the top of memory.

In Protected mode, the Segment Registers are misnommers to be bland,
they should be called Descriptor Table Indeces... ie. the memory
mapping info in inthe Descriptor Table, the Segment REgister just
points to the entry inside the Descriptor table.

-- 
Hendrik Visage

  parent reply	other threads:[~2007-06-04 23:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-30 22:31 Segment override and lldt instruction A D
2007-05-31  0:45 ` Frank Kotler
2007-05-31  1:21   ` A D
2007-06-04 23:52   ` Hendrik Visage [this message]
2007-06-11  0:33     ` A D
2007-06-11  1:14       ` Frank Kotler
2007-06-11  5:30       ` Brian Raiter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d93f04c70706041652k3be549bs8140489a8abbe0b6@mail.gmail.com \
    --to=hvjunk@gmail.com \
    --cc=a_d_249@hotmail.com \
    --cc=fbkotler@verizon.net \
    --cc=linux-assembly@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.