SUBTTL TOPS-10 Netmail Support - SNDNET
TOPS10<
;This routine is called when we have a message ready to be sent and we
;believe that one or more addressees are network addresses. Our task
;is to handle the network portion of the job. If the other system is
;a TEN, we may succeed in mailing the message immediately. Otherwise,
;the message will be queued for the MAIL DAEMON (NETMAI). Unlike
;The OTHER operating system, once the message is queued, it is gone
;- The TOPS-20 crock of telling DMAILR to hurry up is not present.
;Thus, note that .MAILR is called ONLY by SNDNET; there is no NETMAIL command
;
;U is pointing to either a TO or a CC list. The end of the list is
;pointed to by W. We are going to do one giant loop over each
;entry in the list, and send to the maildaemon at the node. But
;since the maildaemons will accept the message once, and then
;forward to multiple receipients, we only send to each maildaemon once.
;F%NSP=1B16
; Here to stuff the header out
SEND: ILDB A,B ; Get the character
JUMPE A,[RET] ; Return to caller when done
SEND1: SOSGE OBUF+.BFCTR ; Room for this character
JRST SEND2 ; Nope, then output buffer and proceed
IDPB A,OBUF+.BFPTR ; Place it into buffer
JRST SEND ; and get the next one
SEND2: MOVEI C,.FOOUT ;
HRRM C,FILBLK+.FOFNC ; Setup for output
MOVE C,[XWD .FOFNC+1,FILBLK] ;
FILOP. C, ; Output buffer
HALT . ; Fix this later
JRST SEND1 ; Continue on with it
SNDNET: SETO C,
AOS (P) ;ASSUME SKIP RETURN FOR STARTERS
SNDNE1: CAILE U,(W) ;ANYTHING TO (MORE) DO?
RET ;THIS MIGHT RET +2
MOVE B,(U) ;FETCH RECEIPIENT BITS
TXNE B,AD%PFX!AD%SFX!AD%PRN!AD%DEL!AD%DON ;REASONS NOT TO DO THIS
AOJA U,SNDNE1 ;FINE, SOMEONE ELSE DID IT
AOSN C ;FIRST TIME HERE?
SOS (P) ;CANCEL THAT SKIP RETURN!
CITYPE <%Mail not queued for >
MOVEI A,(B)
HRLI A,(POINT 7)
$CALL KBFTOR
AOJA U,SNDNE1 ; try next