1: / C library -- wait
   2: 
   3: / pid = wait();
   4: /   or,
   5: / pid = wait(&status);
   6: /
   7: / pid == -1 if error
   8: / status indicates fate of process, if given
   9: 
  10: .globl  _wait, _nargs, cerror
  11: 
  12: _wait:
  13:         mov     r5,-(sp)
  14:         mov     sp,r5
  15:         jsr     pc,_nargs
  16:         mov     r0,-(sp)
  17:         sys     wait
  18:         bec     1f
  19:         tst     (sp)+
  20:         jmp     cerror
  21: 1:
  22:         tst     (sp)+
  23:         beq     2f
  24:         mov     r1,*4(r5)       / status return
  25: 2:
  26:         mov     (sp)+,r5
  27:         rts     pc
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 631
Valid CSS Valid XHTML 1.0 Strict