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