From: Dragan Stancevic <visitor@xalien.org>
To: dAvId KeDrOsKy <davidkedrosky@rogers.com>,
Linux Assembly Programming List <linux-assembly@vger.kernel.org>
Subject: Re: Newbie Question
Date: Thu, 27 Feb 2003 15:19:52 -0800 [thread overview]
Message-ID: <200302271519.52122.visitor@xalien.org> (raw)
In-Reply-To: <200302271757.42990.davidkedrosky@rogers.com>
On Thursday 27 February 2003 14:57, dAvId KeDrOsKy wrote:
> The following program gives me a seg fault. But I don't understand why.
>
> 1. mov ebx, dword 1234
> 2. mov ax, [ebx]
>
> To me the code would mean 1) move the integer 1234 into ebx and then 2)
> move the value of ebx into ax. But of course my reasoning is incorrect.
You are trying to apply indirection to ebx, failing while trying to read from
a memory location that is not accessible to your process.
Drop the brackets, and also you probably want eax, right?
--
Peace can only come as a natural consequence
of universal enlightenment. -Dr. Nikola Tesla
next prev parent reply other threads:[~2003-02-27 23:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-27 22:57 Newbie Question dAvId KeDrOsKy
2003-02-27 23:19 ` Dragan Stancevic [this message]
2003-02-27 23:26 ` Rudolf Marek
2003-02-27 23:42 ` Robert G. Plantz
2003-02-28 6:28 ` hpr
2003-02-28 0:27 ` Slack Traq
-- strict thread matches above, loose matches on Subject: below --
2005-09-03 17:16 newbie question raphael
2005-09-03 17:36 ` jeff
2005-09-03 20:10 ` Martin Fflores
[not found] <Pine.VMS.3.91-2(vms).1030228001923.25337A-100000@cs.felk.cvut.cz>
2003-02-28 0:45 ` Newbie Question Dragan Stancevic
2002-10-24 21:42 dAvId KeDrOsKy
2002-10-24 22:15 ` Rudolf Marek
2002-10-24 23:43 ` Brian Raiter
2002-10-25 3:07 ` Robin Miyagi
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=200302271519.52122.visitor@xalien.org \
--to=visitor@xalien.org \
--cc=davidkedrosky@rogers.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).