1: /* 2: * Copyright (c) 1987 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: */ 6: 7: #ifdef SYSLIBC_SCCS 8: _sccsid: <@(#)execv.s 2.6 (2.11BSD GTE) 1995/05/08\0> 9: .even 10: #endif SYSLIBC_SCCS 11: 12: /* 13: * XXX - this routine can't use SYSCALL!!! 14: */ 15: #include "SYS.h" 16: 17: .globl _environ 18: 19: ENTRY(execv) 20: mov _environ,-(sp) / pass default environment, 21: mov 6(sp),-(sp) / argv list pointer, 22: mov 6(sp),-(sp) / name 23: tst -(sp) / simulate return address stack spacing 24: SYS(execve) / and go for it ... / / trap 59 -> [kernel] -> syscall() -> via sysent[] -> handler: execve / 25: add $8.,sp / if we get back it's an error 26: jmp x_error