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 _utime.c
_wait.c _wait.c
_write.c _write.c
stbrksz.s
stcatch.s
stsndrec.s
_stsndrec.s
vectab.c vectab.c
errno.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
.define _brksize .extern endbss, __brksize
.extern _end .sect .text
#ifdef ACK .sect .rom
.sect .text .sect .data
.sect .rom .sect .bss
.sect .data
.sect .bss
#endif ACK
.sect .data .sect .data
_brksize: __brksize:
.data4 _end .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 #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 mtype = 2 ! M+mtype = &M.m_type
.sect .text .sect .text
_begsig: __begsig:
movem.l FREEREGS,-(sp) movem.l FREEREGS,-(sp)
clr.l d0 clr.l d0
#ifdef ALCYON #ifdef ALCYON
@ -25,15 +19,15 @@ _begsig:
#else #else
move.w 16(sp),d0 ! d0 = signal number move.w 16(sp),d0 ! d0 = signal number
#endif #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 move.w d0,-(sp) ! func called with signal number as arg
asl.l #2,d0 ! pointers are four bytes on 68000 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 move.l -4(a0,d0),a0 ! a0 = address of routine to call
jsr (a0) jsr (a0)
back: back:
add.l #2,sp ! get signal number off stack 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 movem.l (sp)+,FREEREGS
add.l #2,sp ! remove signal number from stack add.l #2,sp ! remove signal number from stack
rtr rtr

View file

@ -1,36 +1,21 @@
# .define _send
.define _send .define _receive
.define _receive .define _sendrec
.define _sendrec .sect .text
#ifdef ACK .sect .rom
.sect .text .sect .data
.sect .rom .sect .bss
.sect .data
.sect .bss
#endif ACK
! ===================================================================== ! =====================================================================
! send and receive = ! send and receive =
! ===================================================================== ! =====================================================================
! send(), receive(), sendrec() destroy d0, d1, and a0. ! send(), receive(), sendrec() destroy d0, d1, and a0.
! See ../h/com.h for C definitions .sect .text
SEND = 1
RECEIVE = 2
BOTH = 3
.sect .text _send: jmp __send
_send: move.w #SEND,d0 ! send(dest, ptr)
bra L0
_receive: _receive:
move.w #RECEIVE,d0 ! receive(src, ptr) jmp __receive
bra L0
_sendrec: _sendrec:
move.w #BOTH,d0 ! sendrec(srcdest, ptr) jmp __sendrec
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