USG_PG3/usr/source/clib4/msg.s
/ c library - message functions
/
/ msgenab()
/ msgdisab()
/
/ send(buffer,size,topid,type) conditional send
/ sendw(buffer,size,topid,type) unconditional send
/
/ recv(buffer,size,&structure,type) conditional receive
/ recvw(buffer,size,&structure,type) unconditional receive
/
.globl _msgenab,_msgdisab
.globl _send,_sendw
.globl _recv,_recvw
.globl cerror
INDIR = 0
MSG = 49.
DISAB = 0
ENAB = 1
SEND = 2
SENDW = 3
RECV = 4
RECVW = 5
.text
_msgdisab:
mov $DISAB,func
br 1f
_msgenab:
mov $ENAB,func
1:
mov r5,-(sp)
mov sp,r5
sys INDIR; 9f
bec 1f
jmp cerror
1:
clr r0
mov (sp)+,r5
rts pc
_send:
mov $SEND,func
br 1f
_sendw:
mov $SENDW,func
br 1f
_recv:
mov $RECV,func
br 1f
_recvw:
mov $RECVW,func
1:
mov r5,-(sp)
mov sp,r5
mov 4(r5),buf
mov 6(r5),r0
mov 8.(r5),arg3
mov 10.(r5),type
sys INDIR; 9f
bec 1f
jmp cerror
1:
mov (sp)+,r5
rts pc
.data
9:
sys MSG; func:..; buf:..; arg3:..; type:..