-----BEGIN PGP SIGNED MESSAGE-----

On Tue, 13 Mar 2001, Nickolay A. Kritsky wrote:

> Hi all!
> It seems to me that you guys are my last hope, but if  i am asking in the
> wrong place - sorry.
> 
> I wrote my first asm program for FreeBSD:
> 
> section    .code
> global _start
> _start:
>     push dword envp
>     push dword argvp
>     push dword fname
>     mov eax,59  ; execve

Here you must push long (dword) because int 0x80 expects EIP

main :
 pushl 3rd
 pushl 2nd
 pushl 1st
 call execve  <--- call will push EIP on stack 

execve :
  leal $0x3b,%eax
  int $0x80

Stack should be ->
    [EIP][1st][2nd][3rd] but instead EIP you can just push anything you
want.

Vojislav Milunovic
[EMAIL PROTECTED]

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQEVAwUBOq486y3gPLld8IkLAQEy2gf9HLvwmii7QTyNuHBt6qQqf5jBqMPFPw8j
kcW/5Oss05kfayh6tmrLVRCzP3MYNYXXKSgxjAKzH+OmN/FHlaTsZIIfQFnU561z
a1Qau+CWjJ5hUuIfE1xGPPVDaWC8e3MF83ZwH9CN3pnIZVUh/3OectyiTGwgwyEV
iGo65HAlgW9GBZznmzYK7PXOkWrRV3olcflIverL1dKMZbow0MCOQ57LMLnNY4ck
Kl6dt8lVLd+K1sHnXdO09eqogiyXPmJEmIJJGRiR2iKMo3Zl5ptGfN/pb00NnNiT
5eNeOQbVEmDJg0swig6VrY2kSqUsMjCpWFW2TDItvtUp8nW9uJ1mtA==
=6Qs3
-----END PGP SIGNATURE-----



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to