Added missing files

This commit is contained in:
ceriel 1992-05-15 13:55:14 +00:00
parent 5362ef6f20
commit 3d52b0d475
5 changed files with 71 additions and 58 deletions

View file

@ -117,5 +117,9 @@ _unlink.c
_utime.c
_wait.c
_write.c
stbrksz.s
stcatch.s
stsndrec.s
_stsndrec.s
vectab.c
errno.c

View file

@ -0,0 +1,33 @@
.define __send
.define __receive
.define __sendrec
.sect .text
.sect .rom
.sect .data
.sect .bss
! =====================================================================
! send and receive =
! =====================================================================
! send(), receive(), sendrec() destroy d0, d1, and a0.
! See ../h/com.h for C definitions
SEND = 1
RECEIVE = 2
BOTH = 3
.sect .text
__send: move.w #SEND,d0 ! send(dest, ptr)
bra L0
__receive:
move.w #RECEIVE,d0 ! receive(src, ptr)
bra L0
__sendrec:
move.w #BOTH,d0 ! sendrec(srcdest, ptr)
L0: ! d0 = SEND/RECEIVE/BOTH
move.w 4(sp),d1 ! d1 = dest-src
move.l 6(sp),a0 ! a0 = message pointer
trap #0 ! trap to the kernel
rts ! return

View file

@ -1,13 +1,10 @@
#
.define _brksize
.extern _end
#ifdef ACK
.sect .text
.sect .rom
.sect .data
.sect .bss
#endif ACK
.define __brksize
.extern endbss, __brksize
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .data
_brksize:
.data4 _end
.sect .data
__brksize:
.data4 endbss

View file

@ -1,23 +1,17 @@
#
.define _begsig
.extern _vectab
.extern _M
#ifdef ACK
.sect .text
.sect .rom
.sect .data
.sect .bss
#endif ACK
#ifdef ALCYON
#define FREEREGS d0-d2/a0-a2
#else
#define FREEREGS d0-d1/a0-a1
#endif
.define __begsig
.extern __vectab
.extern __M
.sect .text
.sect .rom
.sect .data
.sect .bss
mtype = 2 ! M+mtype = &M.m_type
.sect .text
_begsig:
.sect .text
__begsig:
movem.l FREEREGS,-(sp)
clr.l d0
#ifdef ALCYON
@ -25,15 +19,15 @@ _begsig:
#else
move.w 16(sp),d0 ! d0 = signal number
#endif
move.w _M+mtype,-(sp) ! push status of last system call
move.w __M+mtype,-(sp) ! push status of last system call
move.w d0,-(sp) ! func called with signal number as arg
asl.l #2,d0 ! pointers are four bytes on 68000
move.l #_vectab,a0
move.l #__vectab,a0
move.l -4(a0,d0),a0 ! a0 = address of routine to call
jsr (a0)
back:
add.l #2,sp ! get signal number off stack
move.w (sp)+,_M+mtype ! restore status of previous system call
move.w (sp)+,__M+mtype ! restore status of previous system call
movem.l (sp)+,FREEREGS
add.l #2,sp ! remove signal number from stack
rtr

View file

@ -1,36 +1,21 @@
#
.define _send
.define _receive
.define _sendrec
#ifdef ACK
.sect .text
.sect .rom
.sect .data
.sect .bss
#endif ACK
.define _send
.define _receive
.define _sendrec
.sect .text
.sect .rom
.sect .data
.sect .bss
! =====================================================================
! send and receive =
! =====================================================================
! send(), receive(), sendrec() destroy d0, d1, and a0.
! See ../h/com.h for C definitions
SEND = 1
RECEIVE = 2
BOTH = 3
.sect .text
.sect .text
_send: move.w #SEND,d0 ! send(dest, ptr)
bra L0
_send: jmp __send
_receive:
move.w #RECEIVE,d0 ! receive(src, ptr)
bra L0
jmp __receive
_sendrec:
move.w #BOTH,d0 ! sendrec(srcdest, ptr)
L0: ! d0 = SEND/RECEIVE/BOTH
move.w 4(sp),d1 ! d1 = dest-src
move.l 6(sp),a0 ! a0 = message pointer
trap #0 ! trap to the kernel
rts ! return
jmp __sendrec