public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73bfa1d
)
Added entry points for ANSI C
author
ceriel
<none@none>
Mon, 22 Jan 1990 13:59:43 +0000
(13:59 +0000)
committer
ceriel
<none@none>
Mon, 22 Jan 1990 13:59:43 +0000
(13:59 +0000)
24 files changed:
mach/pmds/libsys/LIST
patch
|
blob
|
history
mach/pmds/libsys/_alarm.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_close.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_creat.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_dup.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_exec.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_fork.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_fstat.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_getpid.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_gtty.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_ioctl.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_kill.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_link.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_lseek.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_open.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_pause.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_pipe.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_read.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_sbrk.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_stty.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_time.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_unlink.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_wait.s
[new file with mode: 0644]
patch
|
blob
mach/pmds/libsys/_write.s
[new file with mode: 0644]
patch
|
blob
diff --git
a/mach/pmds/libsys/LIST
b/mach/pmds/libsys/LIST
index
43cdccb
..
52c15a3
100644
(file)
--- a/
mach/pmds/libsys/LIST
+++ b/
mach/pmds/libsys/LIST
@@
-37,3
+37,26
@@
exit2.s
time.s
cleanup.s
pause.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
+_unlink.s
+_wait.s
+_write.s
diff --git a/mach/pmds/libsys/_alarm.s
b/mach/pmds/libsys/_alarm.s
new file mode 100644
(file)
index 0000000..
17b64cc
--- /dev/null
+++ b/
mach/pmds/libsys/_alarm.s
@@ -0,0
+1,20
@@
+.define __alarm
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __alarm
+.sect .text
+__alarm:
+tst.b -40(sp)
+link a6,#-0
+move.w 8(a6),-(sp)
+clr.w -(sp)
+jsr __Salarm
+add.l #4,sp
+unlk a6
+rts
+__Salarm: trap #0
+.data2 0x1B
+ rts
diff --git a/mach/pmds/libsys/_close.s
b/mach/pmds/libsys/_close.s
new file mode 100644
(file)
index 0000000..
dbc6691
--- /dev/null
+++ b/
mach/pmds/libsys/_close.s
@@ -0,0
+1,25
@@
+.define __close
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __close
+.sect .text
+__close:
+tst.b -40(sp)
+link a6,#-0
+move.w 8(a6), d2
+ext.l d2
+move.l d2,-(sp)
+jsr __Sclose
+add.l #4,sp
+unlk a6
+rts
+__Sclose: trap #0
+.data2 0x6
+ bcc 1f
+ jmp cerror
+1:
+ clr.l d0
+ rts
diff --git a/mach/pmds/libsys/_creat.s
b/mach/pmds/libsys/_creat.s
new file mode 100644
(file)
index 0000000..
45c31e6
--- /dev/null
+++ b/
mach/pmds/libsys/_creat.s
@@ -0,0
+1,25
@@
+.define __creat
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __creat
+.sect .text
+__creat:
+tst.b -40(sp)
+link a6,#-0
+move.w 12(a6), d2
+ext.l d2
+move.l d2,-(sp)
+move.l 8(a6),-(sp)
+jsr __Screat
+add.l #8,sp
+unlk a6
+rts
+__Screat: trap #0
+.data2 0x8
+ bcc 1f
+ jmp cerror
+1:
+ rts
diff --git a/mach/pmds/libsys/_dup.s
b/mach/pmds/libsys/_dup.s
new file mode 100644
(file)
index 0000000..
88b36e1
--- /dev/null
+++ b/
mach/pmds/libsys/_dup.s
@@ -0,0
+1,41
@@
+.define __dup
+.define __dup2
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __dup
+.sect .text
+__dup:
+tst.b -40(sp)
+link a6,#-0
+move.w 8(a6), d2
+ext.l d2
+move.l d2,-(sp)
+jsr __Sdup
+add.l #4,sp
+unlk a6
+rts
+.extern __dup2
+__dup2:
+tst.b -40(sp)
+link a6,#-0
+move.w 10(a6), d2
+ext.l d2
+move.w 8(a6), d1
+ext.l d1
+move.l d2,-(sp)
+move.l d1,-(sp)
+jsr __Sdup2
+add.l #8,sp
+unlk a6
+rts
+__Sdup2: or.l #64,4(sp)
+
+__Sdup: trap #0
+.data2 0x29
+ bcc 1f
+ jmp cerror
+1:
+ rts
diff --git a/mach/pmds/libsys/_exec.s
b/mach/pmds/libsys/_exec.s
new file mode 100644
(file)
index 0000000..
5b0bdf2
--- /dev/null
+++ b/
mach/pmds/libsys/_exec.s
@@ -0,0
+1,32
@@
+.define __execl
+.define __execve
+.define __execv
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __execl
+.extern __execve
+.extern __execv
+__execl: tst.b -48(sp)
+ link a6,#0
+ move.l _environ,-(sp)
+ pea 12(a6)
+ move.l 8(a6),-(sp)
+ jsr __execve
+ add.l #12,sp
+ unlk a6
+ rts
+__execve: trap #0
+.data2 59
+ jmp cerror
+__execv: tst.b -48(sp)
+ link a6,#0
+ move.l _environ,-(sp)
+ move.l 12(a6),-(sp)
+ move.l 8(a6),-(sp)
+ jsr __execve
+ add.l #12,sp
+ unlk a6
+ rts
diff --git a/mach/pmds/libsys/_fork.s
b/mach/pmds/libsys/_fork.s
new file mode 100644
(file)
index 0000000..
ae6355b
--- /dev/null
+++ b/
mach/pmds/libsys/_fork.s
@@ -0,0
+1,17
@@
+.define __fork
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __fork
+__fork: trap #0
+.data2 0x2
+ bra 3f
+ rts
+3:
+ bcc 2f
+ jmp cerror
+2:
+ clr.l d0
+ rts
diff --git a/mach/pmds/libsys/_fstat.s
b/mach/pmds/libsys/_fstat.s
new file mode 100644
(file)
index 0000000..
564f5d5
--- /dev/null
+++ b/
mach/pmds/libsys/_fstat.s
@@ -0,0
+1,26
@@
+.define __fstat
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __fstat
+.sect .text
+__fstat:
+tst.b -40(sp)
+link a6,#-0
+move.w 8(a6), d2
+ext.l d2
+move.l 10(a6),-(sp)
+move.l d2,-(sp)
+jsr __Sfstat
+add.l #8,sp
+unlk a6
+rts
+__Sfstat: trap #0
+.data2 0x1C
+ bcc 1f
+ jmp cerror
+1:
+ clr.l d0
+ rts
diff --git a/mach/pmds/libsys/_getpid.s
b/mach/pmds/libsys/_getpid.s
new file mode 100644
(file)
index 0000000..
ba00fcb
--- /dev/null
+++ b/
mach/pmds/libsys/_getpid.s
@@ -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/pmds/libsys/_gtty.s
b/mach/pmds/libsys/_gtty.s
new file mode 100644
(file)
index 0000000..
0d1d52f
--- /dev/null
+++ b/
mach/pmds/libsys/_gtty.s
@@ -0,0
+1,18
@@
+.define __gtty
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __gtty
+.sect .text
+__gtty:
+tst.b -40(sp)
+link a6,#-0
+move.l 10(a6),-(sp)
+move.w #29704,-(sp)
+move.w 8(a6),-(sp)
+jsr __ioctl
+add.l #8,sp
+unlk a6
+rts
diff --git a/mach/pmds/libsys/_ioctl.s
b/mach/pmds/libsys/_ioctl.s
new file mode 100644
(file)
index 0000000..
0f1eed7
--- /dev/null
+++ b/
mach/pmds/libsys/_ioctl.s
@@ -0,0
+1,29
@@
+.define __ioctl
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __ioctl
+.sect .text
+__ioctl:
+tst.b -40(sp)
+link a6,#-0
+move.w 10(a6), d2
+ext.l d2
+move.w 8(a6), d1
+ext.l d1
+move.l 12(a6),-(sp)
+move.l d2,-(sp)
+move.l d1,-(sp)
+jsr __Sioctl
+lea 12(sp),sp
+unlk a6
+rts
+__Sioctl: trap #0
+.data2 0x36
+ bcc 1f
+ jmp cerror
+1:
+ clr.l d0
+ rts
diff --git a/mach/pmds/libsys/_kill.s
b/mach/pmds/libsys/_kill.s
new file mode 100644
(file)
index 0000000..
46be033
--- /dev/null
+++ b/
mach/pmds/libsys/_kill.s
@@ -0,0
+1,28
@@
+.define __kill
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __kill
+.sect .text
+__kill:
+tst.b -40(sp)
+link a6,#-0
+move.w 10(a6), d2
+ext.l d2
+move.w 8(a6), d1
+ext.l d1
+move.l d2,-(sp)
+move.l d1,-(sp)
+jsr __Skill
+add.l #8,sp
+unlk a6
+rts
+__Skill: trap #0
+.data2 0x25
+ bcc 1f
+ jmp cerror
+1:
+ clr.l d0
+ rts
diff --git a/mach/pmds/libsys/_link.s
b/mach/pmds/libsys/_link.s
new file mode 100644
(file)
index 0000000..
976b2a8
--- /dev/null
+++ b/
mach/pmds/libsys/_link.s
@@ -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/pmds/libsys/_lseek.s
b/mach/pmds/libsys/_lseek.s
new file mode 100644
(file)
index 0000000..
965a44e
--- /dev/null
+++ b/
mach/pmds/libsys/_lseek.s
@@ -0,0
+1,28
@@
+.define __lseek
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __lseek
+.sect .text
+__lseek:
+tst.b -40(sp)
+link a6,#-0
+move.w 14(a6), d2
+ext.l d2
+move.w 8(a6), d1
+ext.l d1
+move.l d2,-(sp)
+move.l 10(a6),-(sp)
+move.l d1,-(sp)
+jsr __Slseek
+lea 12(sp),sp
+unlk a6
+rts
+__Slseek: trap #0
+.data2 0x13
+ bcc 1f
+ jmp cerror
+1:
+ rts
diff --git a/mach/pmds/libsys/_open.s
b/mach/pmds/libsys/_open.s
new file mode 100644
(file)
index 0000000..
a85433c
--- /dev/null
+++ b/
mach/pmds/libsys/_open.s
@@ -0,0
+1,25
@@
+.define __open
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __open
+.sect .text
+__open:
+tst.b -40(sp)
+link a6,#-0
+move.w 12(a6), d2
+ext.l d2
+move.l d2,-(sp)
+move.l 8(a6),-(sp)
+jsr __Sopen
+add.l #8,sp
+unlk a6
+rts
+__Sopen: trap #0
+.data2 0x5
+ bcc 1f
+ jmp cerror
+1:
+ rts
diff --git a/mach/pmds/libsys/_pause.s
b/mach/pmds/libsys/_pause.s
new file mode 100644
(file)
index 0000000..
971bb31
--- /dev/null
+++ b/
mach/pmds/libsys/_pause.s
@@ -0,0
+1,13
@@
+.define __pause
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __pause
+__pause: trap #0
+.data2 29
+ bcc 1f
+ jmp cerror
+1:
+ rts
diff --git a/mach/pmds/libsys/_pipe.s
b/mach/pmds/libsys/_pipe.s
new file mode 100644
(file)
index 0000000..
482f838
--- /dev/null
+++ b/
mach/pmds/libsys/_pipe.s
@@ -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.w d0,(a0)+
+ move.w d1,(a0)
+ clr.l d0
+ rts
diff --git a/mach/pmds/libsys/_read.s
b/mach/pmds/libsys/_read.s
new file mode 100644
(file)
index 0000000..
2a0c3e4
--- /dev/null
+++ b/
mach/pmds/libsys/_read.s
@@ -0,0
+1,28
@@
+.define __read
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __read
+.sect .text
+__read:
+tst.b -40(sp)
+link a6,#-0
+move.w 14(a6), d2
+ext.l d2
+move.w 8(a6), d1
+ext.l d1
+move.l d2,-(sp)
+move.l 10(a6),-(sp)
+move.l d1,-(sp)
+jsr __Sread
+lea 12(sp),sp
+unlk a6
+rts
+__Sread: trap #0
+.data2 0x3
+ bcc 1f
+ jmp cerror
+1:
+ rts
diff --git a/mach/pmds/libsys/_sbrk.s
b/mach/pmds/libsys/_sbrk.s
new file mode 100644
(file)
index 0000000..
6a873e2
--- /dev/null
+++ b/
mach/pmds/libsys/_sbrk.s
@@ -0,0
+1,52
@@
+.define __brk
+.define __sbrk
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __brk
+.sect .text
+__brk:
+tst.b -40(sp)
+link a6,#-0
+move.l 8(a6),-(sp)
+jsr __Sbrk
+add.l #4,sp
+unlk a6
+rts
+.extern __sbrk
+__sbrk:
+tst.b -40(sp)
+link a6,#-0
+move.w 8(a6), d2
+ext.l d2
+move.l d2,-(sp)
+jsr __Ssbrk
+add.l #4,sp
+unlk a6
+rts
+__Ssbrk: 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
+__Sbrk: trap #0
+.data2 0x11
+ bcc 1f
+ jmp cerror
+1:
+ move.l 4(sp),.limhp
+ clr.l d0
+ rts
diff --git a/mach/pmds/libsys/_stty.s
b/mach/pmds/libsys/_stty.s
new file mode 100644
(file)
index 0000000..
6b3b5b4
--- /dev/null
+++ b/
mach/pmds/libsys/_stty.s
@@ -0,0
+1,18
@@
+.define __stty
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __stty
+.sect .text
+__stty:
+tst.b -40(sp)
+link a6,#-0
+move.l 10(a6),-(sp)
+move.w #29705,-(sp)
+move.w 8(a6),-(sp)
+jsr __ioctl
+add.l #8,sp
+unlk a6
+rts
diff --git a/mach/pmds/libsys/_time.s
b/mach/pmds/libsys/_time.s
new file mode 100644
(file)
index 0000000..
7f9f088
--- /dev/null
+++ b/
mach/pmds/libsys/_time.s
@@ -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/pmds/libsys/_unlink.s
b/mach/pmds/libsys/_unlink.s
new file mode 100644
(file)
index 0000000..
2806dd8
--- /dev/null
+++ b/
mach/pmds/libsys/_unlink.s
@@ -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/pmds/libsys/_wait.s
b/mach/pmds/libsys/_wait.s
new file mode 100644
(file)
index 0000000..
de5436d
--- /dev/null
+++ b/
mach/pmds/libsys/_wait.s
@@ -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.w d1,(a0)
+2:
+ rts
diff --git a/mach/pmds/libsys/_write.s
b/mach/pmds/libsys/_write.s
new file mode 100644
(file)
index 0000000..
a8a425e
--- /dev/null
+++ b/
mach/pmds/libsys/_write.s
@@ -0,0
+1,28
@@
+.define __write
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
+.extern __write
+.sect .text
+__write:
+tst.b -40(sp)
+link a6,#-0
+move.w 14(a6), d2
+ext.l d2
+move.w 8(a6), d1
+ext.l d1
+move.l d2,-(sp)
+move.l 10(a6),-(sp)
+move.l d1,-(sp)
+jsr __Swrite
+lea 12(sp),sp
+unlk a6
+rts
+__Swrite: trap #0
+.data2 0x4
+ bcc 1f
+ jmp cerror
+1:
+ rts