.TITLE VSRC Variable Send Data Request & Connect .IDENT "16jn85" .ENABL LC .PSECT C$CODE ;+ ; Index VSRC Variable Send Request and Connect ; ; Usage ; ; #include ; #define BUFWDS ??? /* number of words in your receive buffer */ ; rad50 rectsk[2]; /* 2 word RAD50 task name */ ; word buffer[BUFWDS]; /* Received data packet */ ; word bufwds; /* number of words in your receive buffer */ ; word efn; /* event flag number to use : 0 means none */ ; word status; /* Returned DSW */ ; efn = ???; /* or in SP.WX8 to use 8-word exit status block */ ; extern int esast(); /* address of routine to take AST when child ; emits status */ ; int esb[?]; /* 1 or 8 word status block gets child's ; exit status. ; ; ; status = vsda(rectsk, buffer, BUFWDS, efn, esast, esb); ; ; [end] ;- ; Edits: ; 16jn85 16-Jun-85 DLE Create. .mcall dir$ vsrc:: mov sp,r0 ; SP will change, use R0 as base register ; ; (R0)=> +0 return address ; +2 taskname address (address of 2 words in rad50) ; +4 message buffer address ; +6 message buffer length (words) ; +10 event flag number (also possibly flag(s)) ; +12 AST address ; +14 status block address ; mov 14(r0),-(sp) ; mov 12(r0),-(sp) ; mov 6(r0),-(sp) ; mov 10(r0),-(sp) ; mov 4(r0),-(sp) ; ; ; here with DPB on stack except for taskname(2 words) and DIC(1 word) ; mov 2(r0),r1 ; (R1) = [taskname] mov 2(r1),-(sp) ; mov (r1),-(sp) ; ; ; now put dic on stack ; mov (pc)+,-(sp) ; .byte 141.,8. ; vsrc$ dir$ ; mov $dsw,r0 ;return DSW return ; .end ; vsrc.mac