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

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