home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / spencer_2bsd.tar.gz / 2bsd.tar / src / pi0 / wait.s < prev    next >
Text File  |  1980-02-17  |  243b  |  20 lines

  1. / C library -- wait
  2.  
  3. / pid = wait(&status);
  4. /
  5. / pid == -1 if error
  6. / status indicates fate of process
  7.  
  8. .globl    _wait, cerror
  9.  
  10. _wait:
  11.     mov    r5,-(sp)
  12.     mov    sp,r5
  13.     sys    wait
  14.     bec    1f
  15.     jmp    cerror
  16. 1:
  17.     mov    r1,*4(r5)    / status return
  18.     mov    (sp)+,r5
  19.     rts    pc
  20.