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
+27
View File
@@ -0,0 +1,27 @@
/ random fixed point number generator
.globl rand, srand
.globl _rand, _srand
_srand:
mov 2(sp),ranx
rts pc
srand:
mov r0,ranx
rts pc
_rand:
rand:
mov r1,-(sp)
mov ranx,r1
mpy $13077.,r1
add $6925.,r1
mov r1,r0
mov r0,ranx
bic $100000,r0
mov (sp)+,r1
rts pc
.data
ranx: 1