Added entry points for ANSI C
authorceriel <none@none>
Mon, 22 Jan 1990 14:15:55 +0000 (14:15 +0000)
committerceriel <none@none>
Mon, 22 Jan 1990 14:15:55 +0000 (14:15 +0000)
26 files changed:
mach/pmds4/libsys/LIST
mach/pmds4/libsys/_alarm.s [new file with mode: 0644]
mach/pmds4/libsys/_close.s [new file with mode: 0644]
mach/pmds4/libsys/_creat.s [new file with mode: 0644]
mach/pmds4/libsys/_dup.s [new file with mode: 0644]
mach/pmds4/libsys/_exec.s [new file with mode: 0644]
mach/pmds4/libsys/_fork.s [new file with mode: 0644]
mach/pmds4/libsys/_fstat.s [new file with mode: 0644]
mach/pmds4/libsys/_getpid.s [new file with mode: 0644]
mach/pmds4/libsys/_gtty.s [new file with mode: 0644]
mach/pmds4/libsys/_ioctl.s [new file with mode: 0644]
mach/pmds4/libsys/_kill.s [new file with mode: 0644]
mach/pmds4/libsys/_link.s [new file with mode: 0644]
mach/pmds4/libsys/_lseek.s [new file with mode: 0644]
mach/pmds4/libsys/_open.s [new file with mode: 0644]
mach/pmds4/libsys/_pause.s [new file with mode: 0644]
mach/pmds4/libsys/_pipe.s [new file with mode: 0644]
mach/pmds4/libsys/_read.s [new file with mode: 0644]
mach/pmds4/libsys/_sbrk.s [new file with mode: 0644]
mach/pmds4/libsys/_stty.s [new file with mode: 0644]
mach/pmds4/libsys/_time.s [new file with mode: 0644]
mach/pmds4/libsys/_times.s [new file with mode: 0644]
mach/pmds4/libsys/_unlink.s [new file with mode: 0644]
mach/pmds4/libsys/_wait.s [new file with mode: 0644]
mach/pmds4/libsys/_write.s [new file with mode: 0644]
mach/pmds4/libsys/sbrk.s

index c4b1667..e1b34be 100644 (file)
@@ -51,3 +51,27 @@ write.s
 exit2.s
 cleanup.s
 cerror.s
+_alarm.s
+_close.s
+_creat.s
+_dup.s
+_exec.s
+_fork.s
+_fstat.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
+_time.s
+_times.s
+_unlink.s
+_wait.s
+_write.s
diff --git a/mach/pmds4/libsys/_alarm.s b/mach/pmds4/libsys/_alarm.s
new file mode 100644 (file)
index 0000000..6c79232
--- /dev/null
@@ -0,0 +1,11 @@
+.define __alarm
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __alarm
+.sect .text
+__alarm:               trap #0
+.data2 0x1B
+                       rts
diff --git a/mach/pmds4/libsys/_close.s b/mach/pmds4/libsys/_close.s
new file mode 100644 (file)
index 0000000..a03cb9d
--- /dev/null
@@ -0,0 +1,14 @@
+.define __close
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __close
+__close:               trap #0
+.data2 0x6
+                       bcc     1f
+                       jmp     cerror
+1:
+                       clr.l   d0
+                       rts
diff --git a/mach/pmds4/libsys/_creat.s b/mach/pmds4/libsys/_creat.s
new file mode 100644 (file)
index 0000000..e9bb672
--- /dev/null
@@ -0,0 +1,13 @@
+.define __creat
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __creat
+__creat:                       trap #0
+.data2 0x8
+                       bcc     1f
+                       jmp     cerror
+1:
+                       rts
diff --git a/mach/pmds4/libsys/_dup.s b/mach/pmds4/libsys/_dup.s
new file mode 100644 (file)
index 0000000..0c90dad
--- /dev/null
@@ -0,0 +1,15 @@
+.define __dup
+.define __dup2
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+__dup2:                or.l    #64,4(sp)
+
+__dup:                 trap #0
+.data2 0x29
+                       bcc     1f
+                       jmp     cerror
+1:
+                       rts
diff --git a/mach/pmds4/libsys/_exec.s b/mach/pmds4/libsys/_exec.s
new file mode 100644 (file)
index 0000000..8cc2fbc
--- /dev/null
@@ -0,0 +1,36 @@
+.define __execl
+.define __execve
+.define __execv
+.define __execle
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+__execl:               tst.b -48(sp)
+               link a6,#0
+               move.l _environ,-(sp)
+3:
+               pea 12(a6)
+4:
+               move.l 8(a6),-(sp)
+               jsr __execve
+               unlk    a6
+               rts
+__execve:      trap #0
+.data2 0x3b
+               jmp cerror
+__execv:               
+               tst.b -48(sp)
+               link a6,#0
+               move.l _environ,-(sp)
+               move.l  12(a6),-(sp)
+               bra     4b
+__execle:      tst.b   -48(sp)
+               link    a6,#0
+               lea     12(a6),a0
+1:
+               tst.l   (a0)+
+               bne     1b
+               move.l  a0,-(sp)
+               bra     3b
diff --git a/mach/pmds4/libsys/_fork.s b/mach/pmds4/libsys/_fork.s
new file mode 100644 (file)
index 0000000..4fc8fd7
--- /dev/null
@@ -0,0 +1,18 @@
+.define __fork
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __fork
+__fork:                trap #0
+.data2 0x2
+               bra 1f
+               bcs 2f
+               rts
+2:
+               jmp cerror
+1:
+               bcs     2b
+               clr.l   d0
+               rts
diff --git a/mach/pmds4/libsys/_fstat.s b/mach/pmds4/libsys/_fstat.s
new file mode 100644 (file)
index 0000000..2053889
--- /dev/null
@@ -0,0 +1,14 @@
+.define __fstat
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __fstat
+__fstat:                       trap #0
+.data2 0x1C
+                       bcc     1f
+                       jmp     cerror
+1:
+                       clr.l   d0
+                       rts
diff --git a/mach/pmds4/libsys/_getpid.s b/mach/pmds4/libsys/_getpid.s
new file mode 100644 (file)
index 0000000..ba00fcb
--- /dev/null
@@ -0,0 +1,10 @@
+.define __getpid
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __getpid
+__getpid:              trap #0
+.data2 0x14
+                       rts
diff --git a/mach/pmds4/libsys/_gtty.s b/mach/pmds4/libsys/_gtty.s
new file mode 100644 (file)
index 0000000..322bf35
--- /dev/null
@@ -0,0 +1,17 @@
+.define __gtty
+.extern __gtty
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+__gtty:
+tst.b -40(sp)
+link   a6,#-0
+move.l 12(a6),-(sp)
+move.l #0x7408,-(sp)
+move.l 8(a6),-(sp)
+jsr __ioctl
+add.l #12,sp
+unlk a6
+rts
diff --git a/mach/pmds4/libsys/_ioctl.s b/mach/pmds4/libsys/_ioctl.s
new file mode 100644 (file)
index 0000000..d08648a
--- /dev/null
@@ -0,0 +1,14 @@
+.define __ioctl
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __ioctl
+__ioctl:               trap #0
+.data2 0x36
+                       bcc     1f
+                       jmp     cerror
+1:
+                       clr.l   d0
+                       rts
diff --git a/mach/pmds4/libsys/_kill.s b/mach/pmds4/libsys/_kill.s
new file mode 100644 (file)
index 0000000..d409d1d
--- /dev/null
@@ -0,0 +1,14 @@
+.define __kill
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __kill
+__kill:                trap #0
+.data2 0x25
+                       bcc     1f
+                       jmp     cerror
+1:
+                       clr.l   d0
+                       rts
diff --git a/mach/pmds4/libsys/_link.s b/mach/pmds4/libsys/_link.s
new file mode 100644 (file)
index 0000000..976b2a8
--- /dev/null
@@ -0,0 +1,14 @@
+.define __link
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __link
+__link:                        trap #0
+.data2 0x9
+                       bcc     1f
+                       jmp     cerror
+1:
+                       clr.l   d0
+                       rts
diff --git a/mach/pmds4/libsys/_lseek.s b/mach/pmds4/libsys/_lseek.s
new file mode 100644 (file)
index 0000000..54e28b1
--- /dev/null
@@ -0,0 +1,13 @@
+.define __lseek
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __lseek
+__lseek:               trap #0
+.data2 0x13
+                       bcc     1f
+                       jmp     cerror
+1:
+                       rts
diff --git a/mach/pmds4/libsys/_open.s b/mach/pmds4/libsys/_open.s
new file mode 100644 (file)
index 0000000..1723bf7
--- /dev/null
@@ -0,0 +1,13 @@
+.define __open
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __open
+__open:                trap #0
+.data2 0x5
+                       bcc     1f
+                       jmp     cerror
+1:
+                       rts
diff --git a/mach/pmds4/libsys/_pause.s b/mach/pmds4/libsys/_pause.s
new file mode 100644 (file)
index 0000000..41154ec
--- /dev/null
@@ -0,0 +1,10 @@
+.define __pause
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __pause
+__pause:                       trap #0
+.data2 0x1D
+                       rts
diff --git a/mach/pmds4/libsys/_pipe.s b/mach/pmds4/libsys/_pipe.s
new file mode 100644 (file)
index 0000000..856954c
--- /dev/null
@@ -0,0 +1,17 @@
+.define __pipe
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __pipe
+__pipe:                trap #0
+.data2 0x2A
+               bcc 1f
+               jmp cerror
+1:
+               move.l 4(sp),a0
+               move.l d0,(a0)+
+               move.l d1,(a0)
+               clr.l d0
+               rts
diff --git a/mach/pmds4/libsys/_read.s b/mach/pmds4/libsys/_read.s
new file mode 100644 (file)
index 0000000..e42548d
--- /dev/null
@@ -0,0 +1,13 @@
+.define __read
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __read
+__read:                trap #0
+.data2 0x3
+                       bcc     1f
+                       jmp     cerror
+1:
+                       rts
diff --git a/mach/pmds4/libsys/_sbrk.s b/mach/pmds4/libsys/_sbrk.s
new file mode 100644 (file)
index 0000000..0819a05
--- /dev/null
@@ -0,0 +1,31 @@
+.define __sbrk
+.define __brk
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+__sbrk:                tst.b   -8(sp)
+                       move.l  4(sp),d0
+                       beq     1f
+                       add.l   .limhp,d0
+                       move.l  d0,-(sp)
+                       clr.l   -(sp)
+                       trap #0
+.data2 0x11
+                       add.l   #8,sp
+                       bcc     1f
+                       jmp     cerror
+1:
+                       move.l  .limhp,d0
+                       move.l  4(sp),d1
+                       add.l   d1,.limhp
+                       rts
+__brk:                 trap #0
+.data2 0x11
+                       bcc     1f
+                       jmp     cerror
+1:
+                       move.l  4(sp),.limhp
+                       clr.l   d0
+                       rts
diff --git a/mach/pmds4/libsys/_stty.s b/mach/pmds4/libsys/_stty.s
new file mode 100644 (file)
index 0000000..29384a1
--- /dev/null
@@ -0,0 +1,17 @@
+.define __stty
+.extern __stty
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+__stty:
+tst.b -40(sp)
+link   a6,#-0
+move.l 12(a6),-(sp)
+move.l #0x7409,-(sp)
+move.l 8(a6),-(sp)
+jsr __ioctl
+add.l #12,sp
+unlk a6
+rts
diff --git a/mach/pmds4/libsys/_time.s b/mach/pmds4/libsys/_time.s
new file mode 100644 (file)
index 0000000..e209b64
--- /dev/null
@@ -0,0 +1,26 @@
+.define _time
+.define __ftime
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern _time
+_time:
+       trap #0
+.data2 0xD
+       tst.l 4(sp)
+       beq 1f
+       move.l 4(sp),a0
+       move.l d0,(a0)
+1:
+       rts
+.extern __ftime
+__ftime:
+       trap #0
+.data2 0x23
+       bcc 1f
+       jmp cerror
+1:
+       clr.l d0
+       rts
diff --git a/mach/pmds4/libsys/_times.s b/mach/pmds4/libsys/_times.s
new file mode 100644 (file)
index 0000000..b3d6168
--- /dev/null
@@ -0,0 +1,11 @@
+.define __times
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __times
+__times:
+       trap #0
+.data2 0x2B
+       rts
diff --git a/mach/pmds4/libsys/_unlink.s b/mach/pmds4/libsys/_unlink.s
new file mode 100644 (file)
index 0000000..2806dd8
--- /dev/null
@@ -0,0 +1,14 @@
+.define __unlink
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __unlink
+__unlink:              trap #0
+.data2 0xA
+                       bcc     1f
+                       jmp     cerror
+1:
+                       clr.l   d0
+                       rts
diff --git a/mach/pmds4/libsys/_wait.s b/mach/pmds4/libsys/_wait.s
new file mode 100644 (file)
index 0000000..2191940
--- /dev/null
@@ -0,0 +1,18 @@
+.define __wait
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __wait
+__wait:                trap #0
+.data2 0x7
+               bcc 1f
+               jmp cerror
+1:
+               tst.l 4(sp)
+               beq 2f
+               move.l 4(sp),a0
+               move.l d1,(a0)
+2:
+               rts
diff --git a/mach/pmds4/libsys/_write.s b/mach/pmds4/libsys/_write.s
new file mode 100644 (file)
index 0000000..cc0cb58
--- /dev/null
@@ -0,0 +1,13 @@
+.define __write
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __write
+__write:               trap #0
+.data2 0x4
+                       bcc     1f
+                       jmp     cerror
+1:
+                       rts
index 47d0032..04b2a75 100644 (file)
@@ -5,12 +5,10 @@
 .sect .data
 .sect .bss
 .sect .text
-.extern _sbrk
-.extern _brk
 _sbrk:         tst.b   -8(sp)
                        move.l  4(sp),d0
                        beq     1f
-                       add.l   nd,d0
+                       add.l   .limhp,d0
                        move.l  d0,-(sp)
                        clr.l   -(sp)
                        trap #0
@@ -19,19 +17,15 @@ _sbrk:              tst.b   -8(sp)
                        bcc     1f
                        jmp     cerror
 1:
-                       move.l  nd,d0
+                       move.l  .limhp,d0
                        move.l  4(sp),d1
-                       add.l   d1,nd
+                       add.l   d1,.limhp
                        rts
 _brk:                  trap #0
 .data2 0x11
                        bcc     1f
                        jmp     cerror
 1:
-                       move.l  4(sp),nd
+                       move.l  4(sp),.limhp
                        clr.l   d0
                        rts
-.sect .data
-nd:
-       .data4 endbss
-.sect .text