Re: chdir on linux does not work

Noprianto <[email protected]> Wed, 24 May 2006 20:20:53 -0700 (PDT)
Newsgroups org.kernel.vger.linux-assembly
Message-ID <[email protected]>
Hi Jeff,

> If you  run this program in a terminal  it will do
> the chdir,
> then restore the original directory when the program
> exits.  Possibly this is what you are seeing?
> 
Yes, thats what i am seeing. 



> >
> > -> from what i read, chdir is system call number
> 12
> >
> >
> > section .text
> >         global _start
> >
> > _start:
> >         mov eax, 12
> >         mov ebx, dir
> >         int 80h
> >
> >
> >         mov eax, 1
> >         mov ebx, 0
> >         int 80h
> >
> >
> >
> > section .data
> > dir:    db      '/bin'
> >
> >
> >


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com