.TITLE MSRCV .ENABLE LC .IDENT /130688/ ; ; Description: AMI Message Receive Routine ; File: [Message]MSRCV.MAC ; Author: Jim Bostwick ; Last Edit: 20-OCT-1989 02:01:02 ; History: ; 20-OCT-1989 JMB - modified header fields ; 18-OCT-1989 JMB - New Integrated Message_rec ; 9-OCT-1989 -JMB- Major happy munging... ; .REM | Procedure MSRcv ( From: RAD56; VAR Msg: Message_rec );External; {*USER* Receive message, filling in both header and text. 'From' specifies the task to accept messages from. If messages from any task are desired, specify a null task name (e.g., both words zero). Constant "Null_Task_name" is defined in MESSAGE.TYP for this purpose. Status available in $DSW upon return. NOTE WELL: This routine assumes that the max size of Message_Rec is available. Do NOT use shorter records (as with NEW(variant)) unless you are SURE you won't be sent anything longer! See MESSAGE.DOC, and other AMI Message System documentation for additional information. } {*WIZZARD* Uses VSDA internally as the send mechanism. } | ; ; Assemble with PASMAC.MAC as prefix file. ; .mcall VRCD$S .include /pas$ext:pasmac.mac/ .include /message.mac/ PROC MSRCV PARAM From, 2*Integer ; task to get from PARAM a, address ; pointer to message SAVE BEGIN mov sp, r0 ; get recieve task name add #from, r0 ; ... mov a(sp), r1 ; point to message ; ; RSX will add 2 words to the specified buffer size, to accomodate ; the sender task name. Since we have made provision for it, we ; pre-decrement the buffer size. Trust me - it'll all work out. ; mov #, R2 ; set max message length ; round up, and ; drop first 2-word field asr r2 ; convert to words VRCD$S r0,r1,r2 ENDPR .END