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 @@
.globl length
.globl position
.globl w, r, a, l
/
/
/ routine to return the length of a string
/
/ mov ...,r1
/ jsr pc,length
/ mov r0,...
/
length:
mov w(r1),r0
sub a(r1),r0
rts pc
/
/
/ routine to return the read pointer position
/
/ mov ...,r1
/ jsr pc,position
/ mov r0,...
/
position:
mov r(r1),r0
sub a(r1),r0
rts pc