TSRSET EQU >F100 TSRB EQU >0600 TCOUT EQU >5FFD RDIN EQU >5FFB RCIN EQU >5FF9 ; Register usage: ; R0 - receive buffer size. Result is number of bytes loaded into buffer. ; R1 - cpu address of buffer ; Destroys R0 - R8 recvmsg LI R2,TSRSET MOVB R2,@TCOUT RM1 CB @RCIN,R2 JNE RM1 LI R2,TSRB ; set read mode MOVB R2,@TCOUT RM2 MOVB @RCIN,R3 CB R2,R3 JNE RM2 AI R2,>0100 ANDI R2,>0100 ORI R2,TSRB MOVB @RDIN,R4 ; read MSB of data size SWPB R4 MOVB R2,@TCOUT RM3 MOVB @RCIN,R3 CB R2,R3 JNE RM3 AI R2,>0100 ANDI R2,>0100 ORI R2,TSRB MOVB @RDIN,R4 ; read LSB of data size SWPB R4 CLR R0 ; reset byte counter CI R4,>0000 ; if size is 0, then be done JEQ rrt rnext MOVB R2,@TCOUT RM4 MOVB @RCIN,R3 CB R2,R3 JNE RM4 AI R2,>0100 ANDI R2,>0100 ORI R2,TSRB ; Change to attempt avoidinga problem copying to fast mem on PEB bus ; MOVB @RDIN,*R1+ ; copy byte from tipi to RAM : replace above line that directly copies from TIPI register to external MEM ; with this that holds it in a scratchpad register first MOVB @RDIN,R3 ; assuming R3 is in TMS9995 MOVB R3,*R1+ ; end of Geneve experiment INC R0 ; count the read ops C R0,R4 JNE rnext ; if not done then go back and read next rrt RT