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: <@(#)execle.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: ENTRY(execle)
  18:         tst     -(sp)           / leave space for environment pointer
  19:         mov     sp,r0           / calculate address of first argv element
  20:         add     $6.,r0
  21:         mov     r0,-(sp)        / (pass it)
  22: 1:
  23:         tst     (r0)+           / found the end of the argv list yet?
  24:         bne     1b              / nope - keep looping
  25:         mov     (r0),2(sp)      / yeah, pass the user environment pointer
  26:         mov     6(sp),-(sp)     / pass the name
  27:         tst     -(sp)           / simulate return address stack spacing
  28:         SYS(execve)             /   and go for it ...
      /
      /   trap 59 -> [kernel] -> syscall() -> via sysent[] -> handler: execve
      /
  29:         add     $8.,sp          / if we get back it's an error
  30:         jmp     x_error

Defined functions

_sccsid defined in line 8; never used
Last modified: 1995-05-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1843
Valid CSS Valid XHTML 1.0 Strict