source: trunk/minix/lib/i86/rts/_sendrec.s@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 827 bytes
RevLine 
[9]1.define __send, __receive, __sendrec
2
3! See ../h/com.h for C definitions
4SEND = 1
5RECEIVE = 2
6BOTH = 3
7SYSVEC = 32
8
9!*========================================================================*
10! _send and _receive *
11!*========================================================================*
12! _send(), _receive(), _sendrec() all save bp, but destroy ax, bx, and cx.
13.extern __send, __receive, __sendrec
14__send: mov cx,*SEND ! _send(dest, ptr)
15 jmp L0
16
17__receive:
18 mov cx,*RECEIVE ! _receive(src, ptr)
19 jmp L0
20
21__sendrec:
22 mov cx,*BOTH ! _sendrec(srcdest, ptr)
23 jmp L0
24
25 L0: push bp ! save bp
26 mov bp,sp ! can't index off sp
27 mov ax,4(bp) ! ax = dest-src
28 mov bx,6(bp) ! bx = message pointer
29 int SYSVEC ! trap to the kernel
30 pop bp ! restore bp
31 ret ! return
32
Note: See TracBrowser for help on using the repository browser.