home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / source / s4 / execv.s < prev    next >
Encoding:
Text File  |  1975-05-13  |  531 b   |  32 lines

  1. / C library -- execv
  2.  
  3. / execv(file, argv);
  4. /
  5. / where argv is a vector argv[0] ... argv[x], 0
  6. / last vector element must be 0
  7. /
  8. / The _exectrap flags is used by the debugger and causes
  9. / a trace trap on the first instruction of the executed instruction
  10. / to give a chance to set breakpoints.
  11.  
  12. .globl    _execv, cerror
  13. .comm    __exectrap,2
  14. rtt    = 6
  15.  
  16. _execv:
  17.     mov    r5,-(sp)
  18.     mov    sp,r5
  19.     mov    4(r5),0f
  20.     mov    6(r5),0f+2
  21.     tst    __exectrap
  22.     beq    1f
  23.     mov    $170020,-(sp)    / t-bit
  24.     mov    $1f,-(sp)
  25.     rtt
  26. 1:
  27.     sys    0; 9f
  28.     jmp    cerror
  29. .data
  30. 9:
  31.     sys    exec; 0:..; ..
  32.