| Rev | Line | |
|---|
| [9] | 1 | .define __send, __receive, __sendrec
|
|---|
| 2 |
|
|---|
| 3 | ! See ../h/com.h for C definitions
|
|---|
| 4 | SEND = 1
|
|---|
| 5 | RECEIVE = 2
|
|---|
| 6 | BOTH = 3
|
|---|
| 7 | SYSVEC = 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.