,lun.ti,ef.rem,,remios,, remtab: qiow$ ,lun.ti,ef.rem,,remios,, remxoff: qiow$ io.wal,lun.ti,ef.rem,,,, remxon: qiow$ io.wal,lun.ti,ef.lot,,,, ; ; Other stuff ; efbuf: .blkw 4 ; Event flags buffer rembf: .blkb 2 ; Remote data buffer rembf1: .blkb 256. ; Local output data buffer rembf2: .blkb 256. ; Local output data buffer bufptr: .word 0 ; Local output buffer pointer locbf: .blkb 2 ; Local data buffer eseen: .word 0 ; 1 = escape seen locios: .word 0,0 remios: .word 0,0 .psect $code ; .sbttl RSX Connect Code -- Setup .mcall qio$ qiow$ qiow$s dir$ wtlo$s setf$s .mcall alun$s dscp$s encp$s exit$s rdaf$s srex$s .sbttl Connect code for RSX kermit ; ; D O C O N N - Connect for native RSX ; ; Assumes that the remote device has been attached via the ; SET LINE command and its "asslun()" routine. .enabl lsb xdorsx::message ,cr clr eseen ; must do this for next connect cmd calls ttpars ,<#ttname> ; Get remote unit number srex$s #rsxabo ; abort perhaps alun$s #lun.ti,r1,r0 ; Assign it alun$s #lun.co,#"TI,#0 ; Assign our local terminal tst proflg bne 5$ ; yes, don't try to attach xk0: qiow$s #io.att,#lun.ti,#ef.rem ; and now Attach it. (jfp 840614) 5$: ; ; Save local and remote's /{NO}FULLDUPLEX settings, and ; set them to /FULLDUPLEX. Then DISABLE CHECKPOINTING ; so asynchronous buffered I/O is disabled and true full ; duplex communication can take place. ; BDN 18-Apr-84 10:41:51 Also force slave mode ; qiow$s #sf.gmc,#lun.ti,#ef.rem,,,,<#savti,#sizti> ; Crude qiow$s #sf.gmc,#lun.co,#ef.loc,,,,<#savco,#2> qiow$s #sf.smc,#lun.ti,#ef.rem,,#remios,,<#fdxchr,#sizchr> qiow$s #sf.smc,#lun.co,#ef.loc,,#remios,,<#fdxchr,#2> ; If lun.ti is currently /noremote (hard wire connection), leave it. ; Notify user to make sure correct TT number. ; If it is /remote , fix it for autocall. tst proflg bne 10$ qiow$s #sf.gmc,#lun.ti,#ef.rem,,,,<#savti2,#sizti2> tstb savti2+1 ; currently /remote ? bne 6$ ; Yes message ,cr br 10$ ; that's all we do if local. 6$: ;- qiow$s #sf.smc,#lun.ti,#ef.rem,,,,<#fixti2,#sizti2> ; fix it. 10$: dscp$s ; **DISABLE CHECKPOINTING** .sbttl RSX Connect code - Remote Input ; ; Prime incoming and outgoing streams ; dir$ #remread dir$ #locread setf$s #ef.lot ; Signal local output available clr sentxof ; no xoff's have been sent clr r3 ; Count of rem buffer (empty) mov #rembf1,bufptr ; Pick a buffer ; ; Main loop - Handle incoming and outgoing streams ; until escape character is detected on outgoing (local KB) ; 20$: wtlo$s 0,# ; Wait for a character on either rdaf$s #efbuf ; Read the event flags ; ; Handle character(s) on incoming stream ; bit #em.rem,efbuf+0 ; Anything coming in? beq 30$ ; (no) movb remios ,r5 ; get the status of the read call iocheck ; and check for allowable errors bcs 23$ ; fatal (likely was IE.DNR) mov bufptr ,r1 ; Get buffer add r3 ,r1 ; and position in buffer movb rembf ,(r1)+ ; put in character inc r3 ; running count of buffer dir$ #remtest ; More in typeahead? movb remios ,r5 ; get the status of the read call iocheck ; and check for allowable errors 23$: bcs 100$ ; fatal (likely was IE.DNR) clr r0 ; m+ may have a lot ready to get bisb rtab+1,r0 ; r0 = # in typeahead beq 25$ ; (no) add r0 ,r3 ; keep count of buffer mov r1,remtab+q.iopl ; Set address to drain into mov r0,remtab+q.iopl+2 ; Set # to read to drain dir$ #remtab ; Read 'em in ;- movb remios ,r5 ; get the status of the read ;- call iocheck ; and check for allowable errors ;- bcs 100$ ; fatal (likely was IE.DNR) 25$: cmp r3 ,#20 ; Check for buffer fill limit ble 28$ ; not yet dir$ #remxoff ; Stop input please mov sp ,sentxof ; flag that we sent an XOFF K11RXXMAC[.050032]K11RXX.MAC[.050032]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddf 28$: dir$ #remread ; Re-issue input .sbttl RSX Connect code - Local Output ; ; Handle completion of output to local terminal ; and check for more output available ; 30$: bit #em.lot,efbuf+0 ; Check output flag beq 40$ ; (no, still busy) tst r3 ; Anything to output beq 40$ ; no mov bufptr,locwrite+q.iopl ; Buffer to write mov r3,locwrite+q.iopl+2 ; amount to write dir$ #locwrite ; Start the output bit #log$co,trace ; Is logging enabled beq 34$ ; no mov bufptr,r1 ; start of data 32$: calls putc,<(r1)+,#lun.lo> ; put character sob r3,32$ ; til count exhausted 34$: cmp bufptr,#rembf1 ; switch buffers beq 36$ mov #rembf1,bufptr br 38$ 36$: mov #rembf2,bufptr 38$: clr r3 ; New buffer is empty tst sentxof ; skip if we never sent an beq 39$ ; xoff please dir$ #remxon ; Start input if stopped clr sentxof ; no xoff's are active now 39$: .sbttl RSX Connect code - Local Input ; ; Handle characters on outgoing (Local input) stream ; do this without fast-drain (yet) ; 40$: bit #em.loc,efbuf+0 ; Anything typed locally? beq 20$ ; (no, loop back) movb locbf,r1 ; r1 = just typed character bic #^C177,r1 ; drop bit 7 if mark set (BDN) cmpb r1,conesc ; Console escape? bne 50$ ; (no) tst eseen ; Already seen one escape? bne 60$ ; (yes, send this one) inc eseen ; Yes, note it for now br 70$ ; And go read again 50$: tst eseen ; Character following conesc? beq 60$ ; (no, send it) call concmd ; Yup, process it clr eseen ; clear the flag tst r0 ; Exit CONNECT mode? bgt 100$ ; (yes, clean up etc.) blt 70$ ; no, but it was a command 60$: clr eseen ; clear the flag setpar locbf ,locbf ; set correctr outgoing parity dir$ #remwrite ; Transmit character to remote tst duplex ; ibm type things today? beq 70$ ; no dir$ #locech ; need half duplex duplex ? 70$: dir$ #locread ; Re-issue local read jmp 20$ ; Loop back .sbttl RSX Connect code - Clean Up and Exit ; ; Exit CONNECT mode ; 100$: call rsxrst ; restore terminal settings encp$s ;**ENABLE CHECKP** return rsxabo: call rsxrst ; called via requested exit srex$s ; disable further exits exit$s ; bye rsxrst: qiow$s #io.kil,#lun.ti,#ef.rem ; Kill incoming I/O qiow$s #io.kil,#lun.co,#ef.loc ; Kill incoming I/O qiow$s #sf.smc,#lun.ti,#ef.rem,,,,<#savti,#sizti> ; Restore lines qiow$s #sf.smc,#lun.co,#ef.loc,,,,<#savco,#2> qiow$s #sf.smc,#lun.ti,#ef.rem,,,,<#savti2,#sizti2> ;jfp qiow$s #io.det,#lun.ti,#ef.rem ; De-Attach remote line return iocheck:mov r0 ,-(sp) ; insure this is saved tstb r5 ; sucessesful read qio ? bpl 180$ ; yes scan r5 ,#200$ ; allowable error code ? tst r0 ; well bne 180$ ; yes, let it through neg r5 ; make > 0 for direrr macro direrr r5 ; simple sec ; failure, exit to command level br 190$ ; bye 180$: clc ; success, stay in connect code 190$: mov (sp)+ ,r0 ; restore old r0 please return 200$: .byte IE.BCC ,IE.DAO ,IE.IES ,IE.NOD ,IE.PES ,IE.VER ,0 .even global .dsabl lsb .sbttl dump i/o to a log file ? dumplo: bit #log$co ,trace ; is this enabled ? beq 100$ ; no save ; yes, save temps please calls putc, ; thats it folks unsave 100$: return sxon: tst conflow beq 100$ calls binwri ,<#xon,#1,#lun.ti> 100$: return sxoff: tst conflow beq 100$ calls binwri ,<#xoff,#1,#lun.ti> 100$: return .save .psect $pdata xon: .byte 'Q&37 xoff: .byte 'S&37 .even .restore global .end