Add original unix v6

This commit is contained in:
memnoth
2018-01-27 22:35:41 +09:00
commit 2c7099ee50
664 changed files with 106254 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
/ C library -- fork
/ pid = fork();
/
/ pid == 0 in child process; pid == -1 means error return
/ in child, parents id is in par_uid if needed
.globl _fork, cerror, _par_uid
_fork:
mov r5,-(sp)
mov sp,r5
sys fork
br 1f
bec 2f
jmp cerror
1:
mov r0,_par_uid
clr r0
2:
mov (sp)+,r5
rts pc
.bss
_par_uid: .=.+2