linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas <blurrpp@yahoo.com>
To: linux-assembly@vger.kernel.org
Subject: Re: getting at raw command line
Date: Thu, 13 Sep 2007 10:32:41 -0700 (PDT)	[thread overview]
Message-ID: <582003.52789.qm@web50304.mail.re2.yahoo.com> (raw)
In-Reply-To: <381529.26934.qm@web50302.mail.re2.yahoo.com>

and again wrong ... (to fast:) ) ... %bl=42,%bh=0 :D
Lukas
--- Lukas <blurrpp@yahoo.com> wrote:

> of course in last line of "code" ;) should be
> %ebx=42
> 
> regards
> Lukas
> 
> --- Lukas <blurrpp@yahoo.com> wrote:
> 
> > As i said, when you start program 'p whatever '
> %esp
> > points place on stack where number of parameters
> was
> > put ex. 
> > $p 1 2 3 -> movl (%esp),%ecx => %ecx=3 )
> > 
> > next (%esp+4) adress of program name ex. 
> > 
> > $/home/usr/bin/p 1 2 3 -> (%esp+4) adres of string
> > "/home/usr/bin/p"
> > 
> > (%esp+8)(+16 if you have 64-bit arch) adress of
> text
> > string of first parameter, so if you write
> > 
> > $ p * -> movl (%esp+8),%ecx / movq (%rsp+16),%rcx
> >         movl (%ecx),%ebx / movq (%rcx),%rbx
> >        %ecx=42 ( '*' )
> > so now you can do with it whatever you want (
> write
> > using SYS_WRITE, printf etc )
> > Lukas
> > 
> > 
> > --- Jack Andrews <effbiae@gmail.com> wrote:
> > 
> > > the shell changes arguments like * to a number
> of
> > > arguments.  is there
> > > a way to get the *?  that is, if my program is
> p,
> > i
> > > want this
> > > behaviour:
> > > 
> > >  $ ls
> > >  file.1 file.2
> > >  $ ls *
> > >  file.1 file.2
> > >  $ p file.1
> > >  file.1
> > >  $ p *
> > >  *
> > > 
> > > i don't want
> > > 
> > >  $ p *
> > >  file.1 file.2
> > > -
> > > To unsubscribe from this list: send the line
> > > "unsubscribe linux-assembly" in
> > > the body of a message to
> majordomo@vger.kernel.org
> > > More majordomo info at 
> > > http://vger.kernel.org/majordomo-info.html
> > > 
> > 
> > 
> > 
> >        
> >
>
____________________________________________________________________________________
> > Pinpoint customers who are looking for what you
> > sell. 
> > http://searchmarketing.yahoo.com/
> > -
> > To unsubscribe from this list: send the line
> > "unsubscribe linux-assembly" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at 
> > http://vger.kernel.org/majordomo-info.html
> > 
> 
> 
> 
>        
>
____________________________________________________________________________________
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-assembly" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html
> 



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

      reply	other threads:[~2007-09-13 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-13 12:18 getting at raw command line Jack Andrews
2007-09-13 13:50 ` Lukas
     [not found] ` <316574.13339.qm@web50312.mail.re2.yahoo.com>
2007-09-13 15:01   ` Jack Andrews
2007-09-13 15:46     ` Gerardo García Peña
2007-09-13 17:15     ` Lukas
2007-09-13 17:20       ` Lukas
2007-09-13 17:32         ` Lukas [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=582003.52789.qm@web50304.mail.re2.yahoo.com \
    --to=blurrpp@yahoo.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).