*** empty log message ***

This commit is contained in:
em 1985-07-26 12:51:45 +00:00
parent 6bdc39213b
commit bc759a2903
63 changed files with 1214 additions and 0 deletions

8
mach/ns/libsys/_exit.s Normal file
View file

@ -0,0 +1,8 @@
.define __exit
.extern __exit
.text
__exit:
enter[], 0
movd 8(fp),tos
movd 1,tos
jsr @.mon

20
mach/ns/libsys/access.s Normal file
View file

@ -0,0 +1,20 @@
.define _access
.extern _access
.text
_access:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 33,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

19
mach/ns/libsys/acct.s Normal file
View file

@ -0,0 +1,19 @@
.define _acct
.extern _acct
.text
_acct:
enter[], 0
movd 8(fp),tos
movd 51,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

12
mach/ns/libsys/alarm.s Normal file
View file

@ -0,0 +1,12 @@
.define _alarm
.extern _alarm
.text
_alarm:
enter[], 0
movd 8(fp),tos
movd 27,tos
jsr @.mon
movd tos,r7
movd r7,r4
exit []
ret 0

9
mach/ns/libsys/brk.s Normal file
View file

@ -0,0 +1,9 @@
.define _brk
.extern _brk
.text
_brk:
enter[], 0
movd 8(fp),@.reghp
movd 0,r4
exit []
ret 0

19
mach/ns/libsys/chdir.s Normal file
View file

@ -0,0 +1,19 @@
.define _chdir
.extern _chdir
.text
_chdir:
enter[], 0
movd 8(fp),tos
movd 12,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

20
mach/ns/libsys/chmod.s Normal file
View file

@ -0,0 +1,20 @@
.define _chmod
.extern _chmod
.text
_chmod:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 15,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

25
mach/ns/libsys/chown.s Normal file
View file

@ -0,0 +1,25 @@
.define _chown
.extern _chown
.text
_chown:
enter[], 0
addr 8(fp),r7
movd 12,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 16,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

19
mach/ns/libsys/chroot.s Normal file
View file

@ -0,0 +1,19 @@
.define _chroot
.extern _chroot
.text
_chroot:
enter[], 0
movd 8(fp),tos
movd 61,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

7
mach/ns/libsys/cleanup.s Normal file
View file

@ -0,0 +1,7 @@
.define __cleanup
.extern __cleanup
.text
__cleanup:
enter[], 0
exit []
ret 0

6
mach/ns/libsys/close.s Normal file
View file

@ -0,0 +1,6 @@
.define _close
.extern _close
.text
_close:
movd 0, r4
ret 0

19
mach/ns/libsys/creat.s Normal file
View file

@ -0,0 +1,19 @@
.define _creat
.extern _creat
.text
_creat:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 8,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,tos
I0011:
movd tos,r7
movd r7,r4
exit []
ret 0

19
mach/ns/libsys/dup.s Normal file
View file

@ -0,0 +1,19 @@
.define _dup
.extern _dup
.text
_dup:
enter[], 0
movd 8(fp),tos
movd 8(fp),tos
movd 41,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,tos
I0011:
movd tos,r7
movd r7,r4
exit []
ret 0

21
mach/ns/libsys/dup2.s Normal file
View file

@ -0,0 +1,21 @@
.define _dup2
.extern _dup2
.text
_dup2:
enter[], 0
movd 8(fp),r7
ord 64,r7
movd 12(fp),tos
movd r7,tos
movd 41,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,tos
I0011:
movd tos,r7
movd r7,r4
exit []
ret 0

5
mach/ns/libsys/errno.s Normal file
View file

@ -0,0 +1,5 @@
.define _errno
.extern _errno
.bss
_errno:.space 4
.text

15
mach/ns/libsys/execl.s Normal file
View file

@ -0,0 +1,15 @@
.define _execl
.extern _execl
.text
_execl:
enter[], 0
movd @__penvp,tos
addr 12(fp),tos
movd 8(fp),tos
movd 59,tos
jsr @.mon
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

26
mach/ns/libsys/execle.s Normal file
View file

@ -0,0 +1,26 @@
.define _execle
.extern _execle
.text
_execle:
enter[], 0
addr 12(fp),tos
I0011:
movd tos,r7
movd r7,tos
cmpd 0(r7),0
beq I0012
movd tos,r7
addr 4(r7),tos
br I0011
I0012:
movd tos,r7
movd 4(r7),tos
addr 12(fp),tos
movd 8(fp),tos
movd 59,tos
jsr @.mon
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

15
mach/ns/libsys/execv.s Normal file
View file

@ -0,0 +1,15 @@
.define _execv
.extern _execv
.text
_execv:
enter[], 0
movd @__penvp,tos
movd 12(fp),tos
movd 8(fp),tos
movd 59,tos
jsr @.mon
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

19
mach/ns/libsys/execve.s Normal file
View file

@ -0,0 +1,19 @@
.define _execve
.extern _execve
.text
_execve:
enter[], 0
addr 8(fp),r7
movd 12,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 59,tos
jsr @.mon
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

11
mach/ns/libsys/exit.s Normal file
View file

@ -0,0 +1,11 @@
.define _exit
.extern _exit
.text
_exit:
enter[], 0
jsr @__cleanup
movd 8(fp),tos
jsr @__exit
adjspd -4
exit []
ret 0

29
mach/ns/libsys/fork.s Normal file
View file

@ -0,0 +1,29 @@
.define _fork
.define _par_uid
.extern _par_uid
.bss
_par_uid:.space 4
.extern _fork
.text
_fork:
enter[], 0
movd 2,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0
I0011:
cmpqd 0,tos
beq I0012
movd tos,r7
movd r7,@_par_uid
movd 0,tos
I0012:
movd tos,r7
movd r7,r4
exit []
ret 0

20
mach/ns/libsys/fstat.s Normal file
View file

@ -0,0 +1,20 @@
.define _fstat
.extern _fstat
.text
_fstat:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 28,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

10
mach/ns/libsys/ftime.s Normal file
View file

@ -0,0 +1,10 @@
.define _ftime
.extern _ftime
.text
_ftime:
enter[], 0
movd 8(fp),tos
movd 35,tos
jsr @.mon
exit []
ret 0

11
mach/ns/libsys/getegid.s Normal file
View file

@ -0,0 +1,11 @@
.define _getegid
.extern _getegid
.text
_getegid:
enter[], 0
movd 47,tos
jsr @.mon
movd tos,r7
movd r7,r4
exit []
ret 0

11
mach/ns/libsys/geteuid.s Normal file
View file

@ -0,0 +1,11 @@
.define _geteuid
.extern _geteuid
.text
_geteuid:
enter[], 0
movd 24,tos
jsr @.mon
movd tos,r7
movd r7,r4
exit []
ret 0

12
mach/ns/libsys/getgid.s Normal file
View file

@ -0,0 +1,12 @@
.define _getgid
.extern _getgid
.text
_getgid:
enter[], 0
movd 47,tos
jsr @.mon
adjspd -4
movd tos,r7
movd r7,r4
exit []
ret 0

11
mach/ns/libsys/getpid.s Normal file
View file

@ -0,0 +1,11 @@
.define _getpid
.extern _getpid
.text
_getpid:
enter[], 0
movd 20,tos
jsr @.mon
movd tos,r7
movd r7,r4
exit []
ret 0

12
mach/ns/libsys/getuid.s Normal file
View file

@ -0,0 +1,12 @@
.define _getuid
.extern _getuid
.text
_getuid:
enter[], 0
movd 24,tos
jsr @.mon
adjspd -4
movd tos,r7
movd r7,r4
exit []
ret 0

12
mach/ns/libsys/gtty.s Normal file
View file

@ -0,0 +1,12 @@
.define _gtty
.extern _gtty
.text
_gtty:
enter[], 0
movd 12(fp),tos
movd 29704,tos
movd 8(fp),tos
jsr @_ioctl
adjspd -12
exit []
ret 0

25
mach/ns/libsys/ioctl.s Normal file
View file

@ -0,0 +1,25 @@
.define _ioctl
.extern _ioctl
.text
_ioctl:
enter[], 0
addr 8(fp),r7
movd 12,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 54,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

20
mach/ns/libsys/kill.s Normal file
View file

@ -0,0 +1,20 @@
.define _kill
.extern _kill
.text
_kill:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 37,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

20
mach/ns/libsys/link.s Normal file
View file

@ -0,0 +1,20 @@
.define _link
.extern _link
.text
_link:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 9,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

19
mach/ns/libsys/lock.s Normal file
View file

@ -0,0 +1,19 @@
.define _lock
.extern _lock
.text
_lock:
enter[], 0
movd 8(fp),tos
movd 53,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

24
mach/ns/libsys/lseek.s Normal file
View file

@ -0,0 +1,24 @@
.define _lseek
.extern _lseek
.text
_lseek:
enter[], 0
addr 8(fp),r7
movd 16,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 19,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,tos
I0011:
movd tos,r4
movd tos,r5
exit []
ret 0

25
mach/ns/libsys/mknod.s Normal file
View file

@ -0,0 +1,25 @@
.define _mknod
.extern _mknod
.text
_mknod:
enter[], 0
addr 8(fp),r7
movd 12,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 14,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

25
mach/ns/libsys/mount.s Normal file
View file

@ -0,0 +1,25 @@
.define _mount
.extern _mount
.text
_mount:
enter[], 0
addr 8(fp),r7
movd 12,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 21,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

20
mach/ns/libsys/mpxcall.s Normal file
View file

@ -0,0 +1,20 @@
.define _mpxcall
.extern _mpxcall
.text
_mpxcall:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 56,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

10
mach/ns/libsys/nice.s Normal file
View file

@ -0,0 +1,10 @@
.define _nice
.extern _nice
.text
_nice:
enter[], 0
movd 8(fp),tos
movd 34,tos
jsr @.mon
exit []
ret 0

19
mach/ns/libsys/open.s Normal file
View file

@ -0,0 +1,19 @@
.define _open
.extern _open
.text
_open:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 5,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,tos
I0011:
movd tos,r7
movd r7,r4
exit []
ret 0

9
mach/ns/libsys/pause.s Normal file
View file

@ -0,0 +1,9 @@
.define _pause
.extern _pause
.text
_pause:
enter[], 0
movd 29,tos
jsr @.mon
exit []
ret 0

23
mach/ns/libsys/pipe.s Normal file
View file

@ -0,0 +1,23 @@
.define _pipe
.extern _pipe
.text
_pipe:
enter[], 0
movd 42,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0
I0011:
movd 8(fp),r7
movd tos,r6
movd r6,4(r7)
movd tos,r6
movd r6,0(8(fp))
movd 0,r4
exit []
ret 0

16
mach/ns/libsys/prof.s Normal file
View file

@ -0,0 +1,16 @@
.define _profil
.extern _profil
.text
_profil:
enter[], 0
addr 8(fp),r7
movd 16,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 44,tos
jsr @.mon
exit []
ret 0

25
mach/ns/libsys/ptrace.s Normal file
View file

@ -0,0 +1,25 @@
.define _ptrace
.extern _ptrace
.text
_ptrace:
enter[], 0
xord @_errno,@_errno
addr 8(fp),r7
movd 16,r0
addd r0,r7
1:
subd 4,r7
movd 0(r7),tos
acbd -4,r0,1b
movd 26,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,tos
I0011:
movd tos,r7
movd r7,r4
exit []
ret 0

15
mach/ns/libsys/read.s Normal file
View file

@ -0,0 +1,15 @@
.define _read
.extern _read
.text
_read:
enter[], 0
save [r0,r1,r2,r3]
movd 3,r0
movd 12(fp),r1
movd 16(fp),r2
movd 0,r3
svc
movd 16(fp),r4
restore [r0,r1,r2,r3]
exit[]
ret 0

11
mach/ns/libsys/sbrk.s Normal file
View file

@ -0,0 +1,11 @@
.define _sbrk
.extern _sbrk
.text
_sbrk:
enter[], 0
movd @.reghp,r7
addd 8(fp),r7
movd r7,@.reghp
movd @.reghp,r4
exit []
ret 0

19
mach/ns/libsys/setgid.s Normal file
View file

@ -0,0 +1,19 @@
.define _setgid
.extern _setgid
.text
_setgid:
enter[], 0
movd 8(fp),tos
movd 46,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

39
mach/ns/libsys/setsig.s Normal file
View file

@ -0,0 +1,39 @@
.define __setsig
.bss
_save:.space 4
_trf:.space 4
.extern __setsig
.text
__setsig:
enter[], 0
movd 8(fp),@_trf
movd @.trpreg,r0
movd _catchit,@.trpreg
movd r0,@_save
exit []
ret 0
_catchit:
enter[], 0
movd @.trpreg,r0
movd _catchit,@.trpreg
movd r0,tos
adjspd -4
movd @_trf,r7
movd 8(fp),tos
jsr r7
cmpqd 0,r4
bne I0021
movd @.trpreg,r0
movd @_save,@.trpreg
movd r0,tos
adjspd -4
jsr @.trp
movd @.trpreg,r0
movd _catchit,@.trpreg
movd r0,tos
adjspd -4
movd tos,r7
movd r7,@_save
I0021:
exit []
ret 0

19
mach/ns/libsys/setuid.s Normal file
View file

@ -0,0 +1,19 @@
.define _setuid
.extern _setuid
.text
_setuid:
enter[], 0
movd 8(fp),tos
movd 23,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

159
mach/ns/libsys/signal.s Normal file
View file

@ -0,0 +1,159 @@
.define _signal
.data
_vector:
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
.long 0
_mapvec:
.long 0
.long 134219784
.long 2048
.long 0
.long 2827
.long 658176
.long 3072
firsttim:
.extern _signal
.long 1
.text
_signal:
enter[], 16
movd 8(fp),r7
addd -1,r7
movd r7,-4(fp)
cmpqd 0,-4(fp)
bgt I0014
cmpd -4(fp),16
blt I0013
I0014:
movd -1,tos
br I0011
I0013:
cmpqd 0,@firsttim
beq I0015
xord @firsttim,@firsttim
movd catchtrp,tos
jsr @__setsig
adjspd -4
I0015:
movd -4(fp),r7
ashd 2,r7
movd _vector(r7),-12(fp)
cmpd -12(fp),12(fp)
beq I0016
movd -4(fp),r7
ashd 2,r7
movd 12(fp),_vector(r7)
cmpd 12(fp),1
bne I0017
movd -3,-16(fp)
br I0018
I0017:
cmpqd 0,12(fp)
bne I0019
movd -2,-16(fp)
br I0018
I0019:
addr 128(8(fp)),-16(fp)
I0018:
movd 8(fp),tos
movd -16(fp),tos
jsr @_sigtrp
adjspd -8
cmpd r4,-1
bne I0016
movd -1,tos
br I0011
I0016:
movd -12(fp),tos
I0011:
movd tos,r7
movd r7,r4
exit []
ret 0
catchtrp:
enter[], 0
cmpd 8(fp),128
ble I0023
cmpd 8(fp),144
bgt I0023
movd 8(fp),r7
subd 128,r7
movd r7,tos
jsr @procesig
adjspd -4
movd r4,tos
br I0021
I0023:
cmpqd 0,8(fp)
bgt I0024
cmpd 8(fp),28
bge I0024
movd _mapvec,r7
addd 8(fp),r7
movzbd 0(r7),r6
cmpqd 0,r6
beq I0024
movd _mapvec,r7
addd 8(fp),r7
movzbd 0(r7),tos
jsr @procesig
adjspd -4
movd r4,tos
br I0021
I0024:
movd 0,tos
I0021:
movd tos,r7
movd r7,r4
exit []
ret 0
procesig:
enter[], 8
movd 8(fp),r7
addd -1,r7
movd r7,-4(fp)
movd -4(fp),r6
ashd 2,r6
movd _vector(r6),-8(fp)
cmpd -8(fp),1
bne I0033
movd 1,tos
br I0031
I0033:
cmpd 8(fp),4
beq I0034
cmpd 8(fp),5
beq I0034
movd -4(fp),r7
ashd 2,r7
movd 1,_vector(r7)
I0034:
cmpqd 0,-8(fp)
bne I0035
movd 0,tos
br I0031
I0035:
movd -8(fp),r7
movd 8(fp),tos
jsr r7
adjspd -4
movd 1,tos
I0031:
movd tos,r7
movd r7,r4
exit []
ret 0

19
mach/ns/libsys/sigtrp.s Normal file
View file

@ -0,0 +1,19 @@
.define _sigtrp
.extern _sigtrp
.text
_sigtrp:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 48,tos
jsr @.mon
cmpqd 0,tos
beq I0011
movd tos,r7
movd r7,@_errno
movd -1,tos
I0011:
movd tos,r7
movd r7,r4
exit []
ret 0

20
mach/ns/libsys/stat.s Normal file
View file

@ -0,0 +1,20 @@
.define _stat
.extern _stat
.text
_stat:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 18,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

19
mach/ns/libsys/stime.s Normal file
View file

@ -0,0 +1,19 @@
.define _stime
.extern _stime
.text
_stime:
enter[], 0
movd 0(8(fp)),tos
movd 25,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

12
mach/ns/libsys/stty.s Normal file
View file

@ -0,0 +1,12 @@
.define _stty
.extern _stty
.text
_stty:
enter[], 0
movd 12(fp),tos
movd 29705,tos
movd 8(fp),tos
jsr @_ioctl
adjspd -12
exit []
ret 0

9
mach/ns/libsys/sync.s Normal file
View file

@ -0,0 +1,9 @@
.define _sync
.extern _sync
.text
_sync:
enter[], 0
movd 36,tos
jsr @.mon
exit []
ret 0

12
mach/ns/libsys/tell.s Normal file
View file

@ -0,0 +1,12 @@
.define _tell
.extern _tell
.text
_tell:
enter[], 0
movd 1,tos
movd 0,tos
movd 8(fp),tos
jsr @_lseek
adjspd -12
exit []
ret 0

15
mach/ns/libsys/time.s Normal file
View file

@ -0,0 +1,15 @@
.define _time
.extern _time
.text
_time:
enter[], 12
addr -12(fp),tos
jsr @_ftime
adjspd -4
cmpqd 0,8(fp)
beq I0013
movd -12(fp),0(8(fp))
I0013:
movd -12(fp),r4
exit []
ret 0

10
mach/ns/libsys/times.s Normal file
View file

@ -0,0 +1,10 @@
.define _times
.extern _times
.text
_times:
enter[], 0
movd 8(fp),tos
movd 43,tos
jsr @.mon
exit []
ret 0

12
mach/ns/libsys/umask.s Normal file
View file

@ -0,0 +1,12 @@
.define _umask
.extern _umask
.text
_umask:
enter[], 0
movd 8(fp),tos
movd 60,tos
jsr @.mon
movd tos,r7
movd r7,r4
exit []
ret 0

19
mach/ns/libsys/umount.s Normal file
View file

@ -0,0 +1,19 @@
.define _umount
.extern _umount
.text
_umount:
enter[], 0
movd 8(fp),tos
movd 22,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

19
mach/ns/libsys/unlink.s Normal file
View file

@ -0,0 +1,19 @@
.define _unlink
.extern _unlink
.text
_unlink:
enter[], 0
movd 8(fp),tos
movd 10,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

20
mach/ns/libsys/utime.s Normal file
View file

@ -0,0 +1,20 @@
.define _utime
.extern _utime
.text
_utime:
enter[], 0
movd 12(fp),tos
movd 8(fp),tos
movd 30,tos
jsr @.mon
cmpqd 0,tos
bne I0011
movd 0,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

29
mach/ns/libsys/wait.s Normal file
View file

@ -0,0 +1,29 @@
.define _wait
.extern _wait
.text
_wait:
enter[], 0
movd 7,tos
jsr @.mon
cmpqd 0,tos
bne I0011
cmpqd 0,8(fp)
beq I0012
movd tos,r7
movd r7,0(8(fp))
movd tos,r6
movd r6,r4
exit []
ret 0
I0012:
adjspd -4
movd tos,r7
movd r7,r4
exit []
ret 0
I0011:
movd tos,r7
movd r7,@_errno
movd -1,r4
exit []
ret 0

15
mach/ns/libsys/write.s Normal file
View file

@ -0,0 +1,15 @@
.define _write
.extern _write
.text
_write:
enter[], 0
save [r0,r1,r2,r3]
movd 4,r0
movd 12(fp),r1
movd 16(fp),r2
movd 0,r3
svc
movd 16(fp),r4
restore [r0,r1,r2,r3]
exit[]
ret 0