From: Paul Irofti <bulibuta@gmail.com>
To: Frank Kotler <fbkotler@comcast.net>
Cc: linux-assembly@vger.kernel.org
Subject: Re: prime numbers
Date: Thu, 14 Jul 2005 06:02:23 +0300 [thread overview]
Message-ID: <42D5D5BF.9040300@gmail.com> (raw)
In-Reply-To: <42D5D32B.8050204@comcast.net>
Frank Kotler wrote:
> Paul Irofti wrote:
>
> ...
>
>> ok, so than what's the diffrence between:
>> a) movb $test, %al
>> b) movb test, %al
>> c) movb (test), %al
>> c) movb ($test), %al #if this exists!
>
>
> Hmmm, I'm actually Nasmist, not an as user, but...
>
>> and how come when i access kernel ops i use $<oper>
>>
>> i.e. movl $__NR_write, %eax #i actually append the address 1?! not
>> put the value 1?!
>
>
> I perhaps shouldn't have said "address"... As I understand it, the '$'
> indicates an "immediate" value. "movl $4, %eax" (or $__NR_write) moves
> the value 4 into %eax. "movl 4, %eax" would move the contents of
> address 0x00000004 into %eax - except that it segfaults because
> 0x00000004 isn't in "your" address space.
>
> Maybe an actual (G)as user can clarify it better. It *is* confusing -
> if it were easy, everybody'd be doing it! :)
>
> Best,
> Frank
>
>
thanks man!
i had the same problems with syntax and address/value access in MASM
when i started, now, i see myself hitting the same spot in the *nix
world of assembly:))
well, i'm blown off, it's 6am here, i need some sleep, hopefully someone
will make my morning..eh! afternoon... sweeter with a short lesson on
the issue!
bye!
prev parent reply other threads:[~2005-07-14 3:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-13 22:40 prime numbers Paul Irofti
2005-07-14 0:14 ` Frank Kotler
2005-07-14 2:21 ` Paul Irofti
2005-07-14 2:51 ` Frank Kotler
2005-07-14 3:02 ` Paul Irofti [this message]
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=42D5D5BF.9040300@gmail.com \
--to=bulibuta@gmail.com \
--cc=fbkotler@comcast.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 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).