ack/mach/minix/libsys/sendrec.s

36 lines
859 B
ArmAsm
Raw Normal View History

1988-04-20 16:47:41 +00:00
.sect .text; .sect .rom; .sect .data
1988-04-19 10:19:15 +00:00
.define _send, _receive, _sendrec
1988-04-20 16:47:41 +00:00
.extern _send, _receive, _sendrec
! See ../h/com.h for C definitions
1988-04-19 10:19:15 +00:00
SEND = 1
RECEIVE = 2
BOTH = 3
SYSVEC = 32
1988-04-20 16:47:41 +00:00
!*========================================================================*
! send and receive *
!*========================================================================*
! send(), receive(), sendrec() all save bp, but destroy ax, bx, and cx.
1988-04-19 10:19:15 +00:00
1989-11-06 11:35:52 +00:00
.sect .text
1988-04-20 16:47:41 +00:00
_send: mov cx,SEND ! send(dest, ptr)
1988-04-19 10:19:15 +00:00
jmp L0
_receive:
1988-04-20 16:47:41 +00:00
mov cx,RECEIVE ! receive(src, ptr)
1988-04-19 10:19:15 +00:00
jmp L0
_sendrec:
1988-04-20 16:47:41 +00:00
mov cx,BOTH ! sendrec(srcdest, ptr)
1988-04-19 10:19:15 +00:00
jmp L0
1988-04-20 16:47:41 +00:00
L0: push bp ! save bp
mov bp,sp ! can't index off sp
mov ax,4(bp) ! ax = dest-src
mov bx,6(bp) ! bx = message pointer
int SYSVEC ! trap to the kernel
pop bp ! restore bp
ret ! return
1988-04-19 10:19:15 +00:00