untested
This commit is contained in:
parent
83e4fb192c
commit
f41b34e4bf
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
* return offset in file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
long lseek();
|
||||||
|
|
||||||
|
long tell(f)
|
||||||
|
{
|
||||||
|
return(lseek(f, ((long) 0), 1));
|
||||||
|
}
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
.psec
|
|
||||||
.code
|
|
||||||
_tell::
|
|
||||||
{
|
|
||||||
dec r15,#6
|
|
||||||
ld @r15,r7
|
|
||||||
ld r6,r7
|
|
||||||
subl rr4,rr4
|
|
||||||
ldk r3,#1
|
|
||||||
call _lseek
|
|
||||||
inc r15,#6
|
|
||||||
ret
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
time module
|
||||||
|
|
||||||
|
global
|
||||||
|
time procedure
|
||||||
|
entry
|
||||||
|
sc #13
|
||||||
|
ldl rr2,rr4
|
||||||
|
test r7
|
||||||
|
ret z
|
||||||
|
ldl @r7,rr2
|
||||||
|
ret
|
||||||
|
end time
|
||||||
|
end time
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
times module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
times procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
subl rr4,rr4
|
||||||
|
sc #43
|
||||||
|
ldl rr2,rr4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end times
|
||||||
|
end times
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
ulimit module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
ulimit procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
ld r1,r4
|
||||||
|
ld r2,r5
|
||||||
|
ldl rr4,0
|
||||||
|
sc #54
|
||||||
|
ldl rr2,rr4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end ulimit
|
||||||
|
end ulimit
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
umask module
|
||||||
|
|
||||||
|
global
|
||||||
|
umask procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
sc #60
|
||||||
|
ld r2,r4
|
||||||
|
ret
|
||||||
|
end umask
|
||||||
|
end umask
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
umount module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
umount procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
xor r4,r4
|
||||||
|
sc #22
|
||||||
|
ld r2,r4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end umount
|
||||||
|
end umount
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
uname module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
uname procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
ld r2,#0
|
||||||
|
sc #57
|
||||||
|
ld r2,r4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end uname
|
||||||
|
end uname
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
unlink module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
unlink procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
xor r4,r4
|
||||||
|
sc #10
|
||||||
|
ld r2,r4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end unlink
|
||||||
|
end unlink
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
ustat module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
ustat procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
ld r1,r7
|
||||||
|
ld r2,#2
|
||||||
|
sc #57
|
||||||
|
ld r2,r4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end ustat
|
||||||
|
end ustat
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
utime module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
utime procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
ld r1,r6
|
||||||
|
xor r4,r4
|
||||||
|
sc #30
|
||||||
|
ld r2,r4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end utime
|
||||||
|
end utime
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
wait module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
wait procedure
|
||||||
|
entry
|
||||||
|
sc #7
|
||||||
|
ldl rr2,rr4
|
||||||
|
jp c,cerror
|
||||||
|
test r7
|
||||||
|
ret z
|
||||||
|
ld @r7,r3
|
||||||
|
ret
|
||||||
|
end wait
|
||||||
|
end wait
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
write module
|
||||||
|
|
||||||
|
external
|
||||||
|
_cerror
|
||||||
|
|
||||||
|
global
|
||||||
|
write procedure
|
||||||
|
entry
|
||||||
|
ld r0,r7
|
||||||
|
ld r1,r6
|
||||||
|
ld r2,r5
|
||||||
|
sc #4
|
||||||
|
ld r2,r4
|
||||||
|
ret nc
|
||||||
|
jp cerror
|
||||||
|
end write
|
||||||
|
end write
|
||||||
Loading…
Reference in New Issue