. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / i86 / rts / _sendrec.s
blob71af81fd383cbc8a5c5580c3cc1fe2cfe39e6fb5
1 .define __send, __receive, __sendrec
3 ! See ../h/com.h for C definitions
4 SEND = 1
5 RECEIVE = 2
6 BOTH = 3
7 SYSVEC = 32
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
17 __receive:
18 mov cx,*RECEIVE ! _receive(src, ptr)
19 jmp L0
21 __sendrec:
22 mov cx,*BOTH ! _sendrec(srcdest, ptr)
23 jmp L0
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