Added entry points for ANSI C
authorceriel <none@none>
Mon, 22 Jan 1990 13:41:58 +0000 (13:41 +0000)
committerceriel <none@none>
Mon, 22 Jan 1990 13:41:58 +0000 (13:41 +0000)
28 files changed:
mach/ns/libsys/LIST
mach/ns/libsys/_alarm.s [new file with mode: 0644]
mach/ns/libsys/_brk.s [new file with mode: 0644]
mach/ns/libsys/_close.s [new file with mode: 0644]
mach/ns/libsys/_creat.s [new file with mode: 0644]
mach/ns/libsys/_dup.s [new file with mode: 0644]
mach/ns/libsys/_dup2.s [new file with mode: 0644]
mach/ns/libsys/_execl.s [new file with mode: 0644]
mach/ns/libsys/_execve.s [new file with mode: 0644]
mach/ns/libsys/_fork.s [new file with mode: 0644]
mach/ns/libsys/_fstat.s [new file with mode: 0644]
mach/ns/libsys/_ftime.s [new file with mode: 0644]
mach/ns/libsys/_getpid.s [new file with mode: 0644]
mach/ns/libsys/_gtty.s [new file with mode: 0644]
mach/ns/libsys/_ioctl.s [new file with mode: 0644]
mach/ns/libsys/_kill.s [new file with mode: 0644]
mach/ns/libsys/_link.s [new file with mode: 0644]
mach/ns/libsys/_lseek.s [new file with mode: 0644]
mach/ns/libsys/_open.s [new file with mode: 0644]
mach/ns/libsys/_pause.s [new file with mode: 0644]
mach/ns/libsys/_pipe.s [new file with mode: 0644]
mach/ns/libsys/_read.s [new file with mode: 0644]
mach/ns/libsys/_sbrk.s [new file with mode: 0644]
mach/ns/libsys/_stty.s [new file with mode: 0644]
mach/ns/libsys/_times.s [new file with mode: 0644]
mach/ns/libsys/_unlink.s [new file with mode: 0644]
mach/ns/libsys/_wait.s [new file with mode: 0644]
mach/ns/libsys/_write.s [new file with mode: 0644]

index c239e82..7afca84 100644 (file)
@@ -22,7 +22,6 @@ execl.s
 execle.s
 execv.s
 execve.s
-_exit.s
 fork.s
 fstat.s
 ftime.s
@@ -62,3 +61,31 @@ utime.s
 wait.s
 write.s
 errno.s
+_alarm.s
+_brk.s
+_close.s
+_creat.s
+_dup.s
+_dup2.s
+_execl.s
+_execve.s
+_exit.s
+_fork.s
+_fstat.s
+_ftime.s
+_getpid.s
+_gtty.s
+_ioctl.s
+_kill.s
+_link.s
+_lseek.s
+_open.s
+_pause.s
+_pipe.s
+_read.s
+_sbrk.s
+_stty.s
+_times.s
+_unlink.s
+_wait.s
+_write.s
diff --git a/mach/ns/libsys/_alarm.s b/mach/ns/libsys/_alarm.s
new file mode 100644 (file)
index 0000000..107f784
--- /dev/null
@@ -0,0 +1,17 @@
+.define __alarm
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __alarm
+.sect .text
+__alarm:
+enter[], 0
+movd 8(fp),tos
+movd 27,tos
+jsr @.mon
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/_brk.s b/mach/ns/libsys/_brk.s
new file mode 100644 (file)
index 0000000..69cd0a8
--- /dev/null
@@ -0,0 +1,14 @@
+.define __brk
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __brk
+.sect .text
+__brk:
+enter[], 0
+movd 8(fp),@.reghp
+movd 0,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/_close.s b/mach/ns/libsys/_close.s
new file mode 100644 (file)
index 0000000..d4b7324
--- /dev/null
@@ -0,0 +1,11 @@
+.define __close
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __close
+.sect .text
+__close:
+movd 0, r4
+ret 0
diff --git a/mach/ns/libsys/_creat.s b/mach/ns/libsys/_creat.s
new file mode 100644 (file)
index 0000000..faffa67
--- /dev/null
@@ -0,0 +1,24 @@
+.define __creat
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __creat
+.sect .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
diff --git a/mach/ns/libsys/_dup.s b/mach/ns/libsys/_dup.s
new file mode 100644 (file)
index 0000000..a237608
--- /dev/null
@@ -0,0 +1,24 @@
+.define __dup
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __dup
+.sect .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
diff --git a/mach/ns/libsys/_dup2.s b/mach/ns/libsys/_dup2.s
new file mode 100644 (file)
index 0000000..2ff3f05
--- /dev/null
@@ -0,0 +1,26 @@
+.define __dup2
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __dup2
+.sect .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
diff --git a/mach/ns/libsys/_execl.s b/mach/ns/libsys/_execl.s
new file mode 100644 (file)
index 0000000..f006b53
--- /dev/null
@@ -0,0 +1,20 @@
+.define __execl
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __execl
+.sect .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
diff --git a/mach/ns/libsys/_execve.s b/mach/ns/libsys/_execve.s
new file mode 100644 (file)
index 0000000..f867309
--- /dev/null
@@ -0,0 +1,24 @@
+.define __execve
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __execve
+.sect .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
diff --git a/mach/ns/libsys/_fork.s b/mach/ns/libsys/_fork.s
new file mode 100644 (file)
index 0000000..c3e5558
--- /dev/null
@@ -0,0 +1,27 @@
+.define __fork
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .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 0,tos
+I0012:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/_fstat.s b/mach/ns/libsys/_fstat.s
new file mode 100644 (file)
index 0000000..923e25f
--- /dev/null
@@ -0,0 +1,25 @@
+.define __fstat
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __fstat
+.sect .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
diff --git a/mach/ns/libsys/_ftime.s b/mach/ns/libsys/_ftime.s
new file mode 100644 (file)
index 0000000..4044b13
--- /dev/null
@@ -0,0 +1,15 @@
+.define __ftime
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __ftime
+.sect .text
+__ftime:
+enter[], 0
+movd 8(fp),tos
+movd 35,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/_getpid.s b/mach/ns/libsys/_getpid.s
new file mode 100644 (file)
index 0000000..6c5a115
--- /dev/null
@@ -0,0 +1,16 @@
+.define __getpid
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __getpid
+.sect .text
+__getpid:
+enter[], 0
+movd 20,tos
+jsr @.mon
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/_gtty.s b/mach/ns/libsys/_gtty.s
new file mode 100644 (file)
index 0000000..ef688ca
--- /dev/null
@@ -0,0 +1,17 @@
+.define __gtty
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __gtty
+.sect .text
+__gtty:
+enter[], 0
+movd 12(fp),tos
+movd 29704,tos
+movd 8(fp),tos
+jsr @__ioctl
+adjspd -12
+exit []
+ret 0
diff --git a/mach/ns/libsys/_ioctl.s b/mach/ns/libsys/_ioctl.s
new file mode 100644 (file)
index 0000000..b88a104
--- /dev/null
@@ -0,0 +1,30 @@
+.define __ioctl
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __ioctl
+.sect .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
diff --git a/mach/ns/libsys/_kill.s b/mach/ns/libsys/_kill.s
new file mode 100644 (file)
index 0000000..ab52a3b
--- /dev/null
@@ -0,0 +1,25 @@
+.define __kill
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __kill
+.sect .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
diff --git a/mach/ns/libsys/_link.s b/mach/ns/libsys/_link.s
new file mode 100644 (file)
index 0000000..295e759
--- /dev/null
@@ -0,0 +1,25 @@
+.define __link
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __link
+.sect .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
diff --git a/mach/ns/libsys/_lseek.s b/mach/ns/libsys/_lseek.s
new file mode 100644 (file)
index 0000000..aa2fc93
--- /dev/null
@@ -0,0 +1,29 @@
+.define __lseek
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __lseek
+.sect .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
diff --git a/mach/ns/libsys/_open.s b/mach/ns/libsys/_open.s
new file mode 100644 (file)
index 0000000..95196b8
--- /dev/null
@@ -0,0 +1,24 @@
+.define __open
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __open
+.sect .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
diff --git a/mach/ns/libsys/_pause.s b/mach/ns/libsys/_pause.s
new file mode 100644 (file)
index 0000000..54d8fd6
--- /dev/null
@@ -0,0 +1,14 @@
+.define __pause
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __pause
+.sect .text
+__pause:
+enter[], 0
+movd 29,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/_pipe.s b/mach/ns/libsys/_pipe.s
new file mode 100644 (file)
index 0000000..f5df62c
--- /dev/null
@@ -0,0 +1,28 @@
+.define __pipe
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __pipe
+.sect .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
diff --git a/mach/ns/libsys/_read.s b/mach/ns/libsys/_read.s
new file mode 100644 (file)
index 0000000..9757ee0
--- /dev/null
@@ -0,0 +1,20 @@
+.define __read
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __read
+.sect .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
diff --git a/mach/ns/libsys/_sbrk.s b/mach/ns/libsys/_sbrk.s
new file mode 100644 (file)
index 0000000..49ca745
--- /dev/null
@@ -0,0 +1,16 @@
+.define __sbrk
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __sbrk
+.sect .text
+__sbrk:
+enter[], 0
+movd @.reghp,r7
+addd 8(fp),r7
+movd r7,@.reghp
+movd @.reghp,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/_stty.s b/mach/ns/libsys/_stty.s
new file mode 100644 (file)
index 0000000..93e0007
--- /dev/null
@@ -0,0 +1,17 @@
+.define __stty
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __stty
+.sect .text
+__stty:
+enter[], 0
+movd 12(fp),tos
+movd 29705,tos
+movd 8(fp),tos
+jsr @__ioctl
+adjspd -12
+exit []
+ret 0
diff --git a/mach/ns/libsys/_times.s b/mach/ns/libsys/_times.s
new file mode 100644 (file)
index 0000000..7321081
--- /dev/null
@@ -0,0 +1,15 @@
+.define __times
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __times
+.sect .text
+__times:
+enter[], 0
+movd 8(fp),tos
+movd 43,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/_unlink.s b/mach/ns/libsys/_unlink.s
new file mode 100644 (file)
index 0000000..44d0dc0
--- /dev/null
@@ -0,0 +1,24 @@
+.define __unlink
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __unlink
+.sect .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
diff --git a/mach/ns/libsys/_wait.s b/mach/ns/libsys/_wait.s
new file mode 100644 (file)
index 0000000..444e224
--- /dev/null
@@ -0,0 +1,34 @@
+.define __wait
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __wait
+.sect .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
diff --git a/mach/ns/libsys/_write.s b/mach/ns/libsys/_write.s
new file mode 100644 (file)
index 0000000..1f1c7d2
--- /dev/null
@@ -0,0 +1,20 @@
+.define __write
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __write
+.sect .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