es the amount of time to wait for a remote ; buffer to fill. Since this time is speed dependent, the speed ; selected is used to index this table and set the fill time. ; ; Note: The time here will actually be multiplied by the ; number of active remote reads which speed dependant. ; .psect $PDATA ,D FILTBL: .BYTE 12. ; S.0 .BYTE 12. ; S.50 .BYTE 12. ; S.75 .BYTE 12. ; S.100 .BYTE 12. ; S.110 .BYTE 10. ; S.134 .BYTE 10. ; S.150 .BYTE 10. ; S.200 .BYTE 10. ; S.300 .BYTE 8. ; S.600 .BYTE 8. ; S.1200 .BYTE 8. ; S.1800 .BYTE 6. ; S.2000 .BYTE 6. ; S.2400 .BYTE 6. ; S.3600 .BYTE 6. ; S.4800 .BYTE 6. ; S.7200 .BYTE 6. ; S.9600 .BYTE 6. ; S.EXTA .BYTE 6. ; S.EXTB .BYTE 4. ; S.19.2 .BYTE 4. ; S.38.4 .EVEN .SBTTL CHRTBL - Character Read Table. ; ; This table is used to set the maximum number of characters ; per remote read QIO. At slower speeds, the size is reduced ; since it takes too much time to fill each read buffer. The ; affect of this is smoother output to the local terminal since ; input and output are taking place at the same time. ; CHRTBL: .WORD COMCHR/8. ; S.0 .WORD COMCHR/8. ; S.50 .WORD COMCHR/8. ; S.75 .WORD COMCHR/6 ; S.100 .WORD COMCHR/6 ; S.110 .WORD COMCHR/4 ; S.134 .WORD COMCHR/4 ; S.150 .WORD COMCHR/3 ; S.200 .WORD COMCHR/3 ; S.300 .WORD COMCHR/2 ; S.600 .WORD COMCHR/2 ; S.1200 .WORD COMCHR/2 ; S.1800 .WORD COMCHR ; S.2000 .WORD COMCHR ; S.2400 .WORD COMCHR ; S.3600 .WORD COMCHR ; S.4800 .WORD COMCHR ; S.7200 .WORD COMCHR ; S.9600 .WORD COMCHR ; S.EXTA .WORD COMCHR ; S.EXTB .WORD COMCHR ; S.19.2 .WORD COMCHR ; S.38.4 .SBTTL QUETBL - Queue Reads Table. ; ; This table is used to set the number of reads to queue to the ; remote whenever input arrives. At high speeds, a large number ; of reads must be queued or else input is lost. At slow speeds ; this number can be less so we reduce the number of reads queued ; to minimumize overhead. ; QUETBL: .BYTE COMQNM-2. ; S.0 .BYTE COMQNM-2. ; S.50 .BYTE COMQNM-2. ; S.75 .BYTE COMQNM-2 ; S.100 .BYTE COMQNM-2 ; S.110 .BYTE COMQNM-2 ; S.134 .BYTE COMQNM-2 ; S.150 .BYTE COMQNM-2 ; S.200 .BYTE COMQNM-2 ; S.300 .BYTE COMQNM-2 ; S.600 .BYTE COMQNM-2 ; S.1200 .BYTE COMQNM-1 ; S.1800 .BYTE COMQNM-1 ; S.2000 .BYTE COMQNM-1 ; S.2400 .BYTE COMQNM-1 ; S.3600 .BYTE COMQNM ; S.4800 .BYTE COMQNM ; S.7200 .BYTE COMQNM ; S.9600 .BYTE COMQNM ; S.EXTA .BYTE COMQNM ; S.EXTB .BYTE COMQNM ; S.19.2 .BYTE COMQNM ; S.38.4 .EVEN .SBTTL Local Terminal Characteristics. .psect RWDATA ,D,RW,LCL,REL,CON ; Local terminal characteristics to save. TTYSV: .BYTE TC.ACR,0 ; {No} Wrap-around. .BYTE TC.BIN,0 ; {No} Read-passall. .BYTE TC.FDX,0 ; {No} Full-duplex. .BYTE TC.HLD,0 ; {No} Hold screen. .BYTE TC.NEC,0 ; {No} Echo. .BYTE TC.RAT,0 ; {No} Typeahead. .BYTE TC.SCP,0 ; {No} Scope. .BYTE TC.SMR,0 ; {No} Lowercase. .BYTE TC.SLV,0 ; {No} Slave. .BYTE TC.TTP ; Terminal type. TTYPE: .BYTE T.V100 ; Default terminal type. TTYSVL = .-TTYSV ; Local characteristics to fix at startup time. FIXCH: .BYTE TC.BIN,0 ; No Read-passall. .BYTE TC.NEC,0 ; Echo. FIXCHL=.-FIXCH ; Local characteristics to change. TTYCH: .BYTE TC.ACR,0 ; No Wrap-around. .BYTE TC.BIN,1 ; Read-passall. .BYTE TC.FDX,1 ; Full-duplex. .BYTE TC.HLD,0 ; No Hold screen. .BYTE TC.NEC,1 ; No Echo. .BYTE TC.RAT,1 ; Typeahead. .BYTE TC.SCP,1 ; Scope. .BYTE TC.SMR,1 ; Lowercase. TTYCHL = .-TTYCH .SBTTL Remote Terminal Characteristics. ; Remote terminal characteristics to save. COMSV: .BYTE TC.ACR,0 ; {No} Wrap-around. .BYTE TC.BIN,0 ; {No} Read-passall. .BYTE TC.FDX,0 ; {No} Full-duplex. .BYTE TC.HLD,0 ; {No} Hold screen. .BYTE TC.NEC,0 ; {No} Echo. .BYTE TC.NBR,0 ; {No} Broadcast. .BYTE TC.RAT,0 ; {No} Typeahead. .BYTE TC.SCP,0 ; {No} Scope. .BYTE TC.SMR,0 ; {No} Lowercase. .BYTE TC.SLV,0 ; {No} Slave. .BYTE TC.TBS,0 ; TypeaK11MCOMAC[.050032]K11MCO.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 DETLOC: QIOW$ IO.DET,lun.co,ef.loc ; Detach the local terminal. DETREM: QIOW$ IO.DET,lun.ti,ef.rem ; Detach the remote terminal. GETLOC: QIOW$ SF.GMC,lun.co,ef.loc,,LIOSB,, ; Get local. GETREM: QIOW$ SF.GMC,lun.ti,ef.rem,,RIOSB,, ; Get remote. GETDLU: QIOW$ SF.GMC,lun.ti,ef.rem,,RIOSB,, ; Get modem. GETSPD: QIOW$ SF.GMC,lun.ti,ef.rem,,RIOSB,, ; Get speed. HANGUP: QIOW$ IO.HNG,lun.ti,ef.rem,,RIOSB ; Hangup remote modem. KILLOC: QIO$ IO.KIL,lun.co,ef.kill ; Kill local terminal I/O. KILREM: QIO$ IO.KIL,lun.ti,ef.kill ; Kill remote terminal I/O. RESLOC: QIOW$ SF.SMC,lun.co,ef.loc,,LIOSB,, ; Local restore. RESREM: QIOW$ SF.SMC,lun.ti,ef.rem,,RIOSB,, ; Remote restore. RESDLU: QIOW$ SF.SMC,lun.ti,ef.rem,,RIOSB,, ; Modem restore. SETLOC: QIOW$ SF.SMC,lun.co,ef.loc,,LIOSB,, ; Local changes. SETREM: QIOW$ SF.SMC,lun.ti,ef.rem,,RIOSB,, ; Remote changes. SETDLU: QIOW$ SF.SMC,lun.ti,ef.rem,,RIOSB,, ; Modem changes. SETSPD: QIOW$ SF.SMC,lun.ti,ef.rem,,RIOSB,, ; Set speed. XOFREM: QIO$ IO.WAL!TF.WBT,lun.ti,,,,, ; Send XOFF to remote. XONREM: QIO$ IO.WAL!TF.WBT,lun.ti,,,,, ; Send XON to remote. ; ; ASCII messages. ; .NLIST BEX CTRLQ: .ASCII ; Transmission ON character. CTRLS: .ASCII ; Transmission OFF character. .EVEN .psect $CODE ,I .SBTTL XDORSX - Mainline Code. ;+ ; ; XDORSX - Mainline code. ; ;- .psect $CODE ,I ALTRSX: call getprv ; Enable task privilege. clr eseen ; Show escape not yet seen. calls ttpars ,<#ttname> ; Get the remote unit number. alun$s #lun.ti,r1,r0 ; Assign LUN to the remote. alun$s #lun.co,#"TI,#0 ; Assign our local terminal ; ; Setup the buffer pointers and associated variables: ; MOV #COMNBF,COMFRE ; Set all remote buffers free. MOV #COMNBF,MINFRE ; Set minimum buffers free. MOV #SRTCOM,LSTCOM ; Set pointer to 1st buffer. CLR COMCNT ; Clear the buffer count. CLR COMCTL ; CLear the XOFF/XON flag. MOV #COMBUF,COMPTR ; Reset the buffer pointer. CLR EXFLG ; Initialize the exit flag. CLR INTFLG ; Reset the interrupt flag. ; Get the current local terminal characteristics. DIR$ #GETLOC ; Get local characteristics. ; Detach the local terminal and re-attach with unsolicited AST input. DSAR$S ; Disable AST'S for a while. DIR$ #DETLOC ; Detach the local terminal. ; Set up the new local terminal characteristics. DIR$ #SETLOC ; Setup local characteristics. CALL CHKLIO ; Check/report any errors. DIR$ #ASTLOC ; Attach local with unsol/AST. CALL CHKLIO ; Check/report any errors. ; Now get the remote characteristics and setup new ones. DIR$ #GETREM ; Get remote characteristics. DIR$ #GETDLU ; Get modem characteristics. DIR$ #GETSPD ; Get the remote port speed. CLRB SMODEM ; Presume it's not a modem. TSTB RMODEM ; Is terminal set for modem ? BEQ 50$ ; If EQ, no. MOVB #2,SMODEM ; Yes, change value of TC.DLU. 50$: DIR$ #SETREM ; Setup remote characteristics. DIR$ #SETDLU ; Setup modem characteristics. DIR$ #SETSPD ; Set the remote port speed. BCS 60$ ; If CS, presume not variable. ; Set up various parameters based on the remote speed. MOVB COMSPD+1,R2 ; Copy the remote port speed. MOVB FILTBL(R2),FILTIM ; Set time for remote buffer fill. MOVB QUETBL(R2),COMQUE ; Set number of reads to queue. ASL R2 ; Convert into a word index. MOV CHRTBL(R2),COMQIO ; Set maximum remote read count. 60$: DIR$ #DETREM ; Detach the remote terminal. DIR$ #ASTREM ; Reattach with UNSOL/AST'S. CALL CHKRIO ; Check/report any errors. DIR$ #CLRCOM ; Clear the typeahead buffer. ENAR$S ; Re-enable AST'S. dscp$s ; *** DISABLE CHECKPOINTING *** SREX$S #RSXABO ; Setup the abort AST routine. .SBTTL LOOP - Loop Reading From Terminals. ;+ ; ; LOOP - Loop reading from local and remote terminals. ;K11MCOMAC[.050032]K11MCO.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|bddfs (send this one). inc eseen ; No, show escape was seen. br 90$ ; And exit the routine ... ; If escape has been seen, process the following character. 10$: tst eseen ; Character following escape ? beq 20$ ; If NE, no (send it). call concmd ; Yes, so go process it. clr eseen ; Clear the escape seen flag. tst r0 ; Should we exit CONNECT mode ? beq 20$ ; If EQ, not a valid command. blt 90$ ; If LT, it's a valid command. MOV #-1,INTFLG ; Else, show interrupt typed. DIR$ #KILLOC ; Kill I/O on the local port. DIR$ #KILREM ; Kill I/O on the remote port. SETF$S #ef.wait ; Wakeup the mainline. BR 90$ ; And use common exit. 20$: clr eseen ; Clear the escape seen flag. ; Check for special control characters. 30$: CMPB #XOFF,TTYBUF ; Was CTRL/S typed ? BNE 40$ ; If NE, no. BIS #100000,COMCTL ; Yes, show XOFF typed. INC USRXOF ; Adjust user XOFF count. BR 70$ ; Send it to the remote. 40$: CMPB #XON,TTYBUF ; Was CTRL/Q typed ? BNE 70$ ; If NE, no. BIC #100000,COMCTL ; Yes, clear XOFF flag. INC USRXON ; Adjust user XON count. SETF$S #ef.wait ; Wakeup mainline to output. TST COMCTL ; Did we send an XOFF ? BNE 90$ ; If NE, yes (no XON yet). ; ; If local echo, append this character to the remote buffer ; for output via the mainline. The character will also get ; written to the logfile using this mechanism. ; 70$: TSTB duplex ; Need to do a local echo ? BEQ 80$ ; If EQ, no. SETF$S #ef.wait ; Wakeup mainline to output. MOVB TTYBUF,@COMPTR ; Copy character main buffer. INC COMPTR ; Adjust the buffer pointer. INC COMCNT ; Adjust the buffer count. CMP COMPTR,#COMEND ; Are we at end of buffer ? BNE 80$ ; If NE, no. MOV #COMBUF,COMPTR ; Yes, wrap to beginning. ; Write the local character to the remote port. 80$: setpar ttybuf,ttybuf ; Set correct outgoing parity. QIO$S #IO.WAL!TF.WBT,#lun.ti,,,,,<#TTYBUF,#1,#0> BCC 90$ ; If CC, success. CALL CHKDIR ; Else, report the error. 90$: unsave ; Restore saved registers. ASTX$S ; Exit from the AST. .SBTTL COMAST - Remote Character AST Routine. ;+ ; ; COMAST - Remote character AST routine. ; ; This routine is entered to notify us that characters have arrived ; on the remote port. Since this is notification only, characters ; arriving are stored in the typeahead buffer until we issue a read. ; ; Inputs: ; (SP) = The AST parameter in our attach QIO. ; ; Outputs: ; All registers are preserved. ; ;- COMAST: TST (SP)+ ; Discard stack parameter. TST EXFLG ; Does user want to exit ? BNE 100$ ; If NE, yes (discard). TST INTFLG ; Exiting the connect code ? BNE 100$ ; If NE, yes (discard). INC COMNOT ; Count AST notifications. MOV R4,-(SP) ; Save R4 MOV R5,-(SP) ; and R5. MOV COMQUE,COMNUM ; Set number of reads to queue. ; ; If we're queuing up another set of reads, that means characters ; are arriving faster than our current reads can complete. When ; this happens, we'll send an XOFF to stop the remote output. ; MOV #COMNBF,R4 ; Set number of free buffers. SUB COMQUE,R4 ; Calculate number now free. CMP COMFRE,R4 ; Queing another set of reads ? BHIS 10$ ; If HIS, no. TST COMCTL ; Did we already send XOFF ? BNE 10$ ; If NE, yes. DIR$ #XOFREM ; Send an XOFF to the remote. INC COMCTL ; Show we sent the XOFF. INC PGMXOF ; Adjust program XOFF count. 10$: BR COMARM ; Queue up the remote reads. ; ; If in command mode, clear the remote typeahead buffer or else ; additional notifiation AST's won't be delevered when we return ; to the virtual terminal mode. ; 100$: DIR$ #CLRCOM ; Clear the typeahead buffer. ASTX$S ; Exit the AST. .SBTTL COMARM - Arm The Remote Reads. ;+ ; ; COMARM - Arm the remote reads. ; ; This routine is used to queue the read requests to the remote terminal. ; For each read, a marktime is also scheduled. When all marktimes have ; expired, this means that little or no data has arrived on the remote ; porK11MCOMAC[.050032]K11MCO.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|bddfeads count. ; ; When the reads get killed, only the current outstanding read ; has an AST delivered. All other reads which are queued, get ; killed, but the specified AST is not delevered. Therefore, ; we must set all buffers as free when abort is detected. ; MOV #COMNBF,COMFRE ; Yes, set all buffers free. ; ; Sometimes when our read is killed, there is a very large byte ; count in the I/O status block. Just another RSX-11M mystery. ; CMP #COMCHR,2(R4) ; Is byte count too large ? BLO 80$ ; If LO, yes (don't use). BR 50$ ; Don't report this error. 40$: MOV (R4),RIOSB ; Copy the I/O error code. CALL CRIOSB ; Write the error message. MOV #-1,ERRFLG ; Show there was an error. 50$: MOV 2(R4),R4 ; Copy the byte count. BEQ 85$ ; If EQ, nothing was read. CMP R4,MAXBC ; Is this the MAX so far ? BLO 55$ ; If LO, no. MOV R4,MAXBC ; Yes, save for status. 55$: ADD R4,RCHIN+2 ; Count the characters read. ADC RCHIN ; Add in the carry (if any). CMP R4,COMQIO ; Is this a full buffer ? BNE 60$ ; If NE, no. INC COMFUL ; Adjust full buffer count. 60$: tst con8bit ; Should we pass eight bits ? bne 65$ ; If NE, yes. bicb #200,(r5) ; No, so clear the high bit. 65$: MOVB (R5)+,(R1)+ ; Copy bytes to main buffer. INC R3 ; Adjust the byte count. CMP R1,#COMEND ; At end of main buffer ? BNE 70$ ; If NE, no. MOV #COMBUF,R1 ; Yes, reset to beginning. 70$: SOB R4,60$ ; Loop until we're done. CMP R3,#COMCTS ; Getting near buffer overflow ? BLO 80$ ; If LO, no. TST COMCTL ; Did we already send XOFF ? BNE 80$ ; If NE, yes. DIR$ #XOFREM ; Send as XOFF to the remote. INC COMCTL ; Show we sent the XOFF. INC PGMXOF ; Adjust program XOFF count. 80$: MOV 10(SP),R4 ; Copy the status block address. MOV R1,COMPTR ; Save the new buffer pointer MOV R3,COMCNT ; and the main buffer count. TST ERRFLG ; Was there a remote error ? BEQ 90$ ; If EQ, no (continue ...) CMPB #IE.DNR,(R4) ; Was error "Device Not Ready" ? BNE 90$ ; If NE, no (queue next read). 85$: MOV (SP)+,R3 ; Restore MOV (SP)+,R1 ; all MOV (SP)+,R5 ; saved MOV (SP)+,R4 ; registers. TST (SP)+ ; Remove status block address. SETF$S #ef.wait ; Wakeup mainline for output. ASTX$S ; And exit the AST. 90$: MOV (SP)+,R3 ; Restore R3 MOV (SP)+,R1 ; and R1. MOV R4,R5 ; Copy the status block address. ADD #4,R5 ; Point to the data buffer. MOV 2(SP),4(SP) ; Move R4 down on the stack. MOV (SP)+,(SP) ; Move R5 down and clean stack. JMP QIOCOM ; Now go queue another read. .SBTTL BUFOUT - Write Buffer to Device. ;+ ; ; BUFOUT - Write a buffer to a device. ; ; Inputs: ; BUFADR = The ending address to write. ; BUFSRT = The starting buffer address. ; BUFEND = The ending buffer address. ; BUFLUN = The device LUN to write to. ; BUFLEN = The number of bytes to write. ; ; Outputs: ; All registers are preserved. ; ;- BUFOUT: CALL $SAVAL ; Save all registers. TST EXFLG ; Is the exit flag set ? BNE 20$ ; If NE, yes. TST INTFLG ; Exiting the connect code ? BNE 20$ ; If NE, yes. MOV BUFLUN,R0 ; Copy the LUN to write to. MOV BUFADR,R2 ; Copy the ending address. SUB BUFLEN,R2 ; Calculate starting address. CMP R2,BUFSRT ; Does buffer wrap around ? BLT 10$ ; If LT, yes. ; Write the buffer to the log file and the terminal. MOV BUFLEN,R3 ; Copy the byte count. CALL WRTLOG ; Write it to the logfile, QIOW$S #IO.WAL,R0,#ef.sync,,#XIOSB,, ; & terminal. CALL CHKXIO ; Check/report any errors. BR 20$ ; Use common return. ; The buffer wraps around, use two QIO's to write buffer. 10$: MOV BUFADR,R3 ; Copy the ending address. SUB BUFSRT,R3 ; Calculate bytes from start. MOV R3,-(SP) ; Save beginning byte count. MOV BUFLEN,R3 ; Copy # of bytes to write. SUB (SP),R3 ; Minus chars at beginning. MOV BUFEND,R2 ; Copy the ending address. SUB R3,R2 ; Calculate starting address. ; Write the buffer to the log file and tK11MCOMAC[.050032]K11MCO.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|bddfl registers. bit #log$co ,trace ; is this enabled ? beq 100$ ; no bit #log$op ,trace ; is it open beq 100$ ; no 10$: movb (r2)+,r0 ; Copy the next character. mov #lun.lo ,r1 ; Set the unit number. call putcr0 ; Write it to the log file. sob r3,10$ ; Write the next character. 100$: return global .SBTTL REMRES - Restore Remote Characteristics. ;+ ; ; REMRES - Restore the remote characteristics. ; ; Restore the remote characteristics and detach the terminal. ; ;- REMRES: DIR$ #KILREM ; Kill any I/O on remote LUN. WTSE$S #ef.kill ; Wait for the kill to complete. DIR$ #RESREM ; Yes, reset the characteristics. DIR$ #RESDLU ; Reset the modem characteristics. DIR$ #DETREM ; Detach the remote terminal. 100$: RETURN .SBTTL RSXABO - Process an ABORT AST. ;+ ; ; RSXABO - Process an ABORT AST. ; ; This routine is called as the result of KERMIT being ABOrted. The ; first time we are entered we simply kill all I/O and try to wakeup ; the mainline to actually exit the program. We also start a timer ; which if it expires, will simply exit the program so we don't hang. ; We don't do too much work here because if we stay at AST level, we ; prevent other AST's from completing which may hang the program. ; ; ; Inputs: ; (SP) = Number of bytes to remove from the stack. ; 2(SP) = The reason for being aborted. ; ;- RSXABO: ADD (SP),SP ; Remove abort information. SREX$S ; Remove abort AST routine. CMKT$S ; Cancel outstanding timers. SETF$S #ef.time ; Set the delay event flag. DIR$ #KILLOC ; Kill I/O on local port. DIR$ #KILREM ; Kill I/O on remote port. SETF$S #ef.wait ; Wakeup the mainline. MOV #-1,EXFLG ; Tell the mainline to exit. MRKT$S ,#5,#SECNDS,#ABOTMO ; Initiate an abort timer. ASTX$S ; Exit the AST. ;+ ; ; This routine is entered when the marktime issued in the abort AST ; routine expires. If this timer expires, this means the mainline ; hasn't detected our exit request so we cancel all I/O, reset the ; terminal characteristics, and then exit the program. ; ;- ABOTMO: TST (SP)+ ; Remove marktime parameter. EXISYS: CALL CANCEL ; Cancel all outstanding I/O. DIR$ #RESLOC ; Reset local characteristics. CALL REMRES ; Restore/detach remote port. DIR$ #HANGUP ; Ensure the modem is hungup. EXIT$S ; And exit to the system ... .sbttl concmd terminal emulation escape commands .enabl lsb concmd::save bicb #^C177 ,r1 scan r1,#200$ ; look for a match here tst r0 ; if no match, return 0 beq 100$ ; ok asl r0 ; word offsets jsr pc ,@210$(r0) ; dispatch to the correct routine tst r0 ; if not set then set to -1 bne 100$ ; already set dec r0 ; set to -1 100$: unsave ; pop r1 and exit return .save .psect $PDATA ,D 200$: .byte 'C&137 ,'c!40 ; drop connection ctrl \ C .byte 'I&137 ,'i!40 ; init the line .byte 'Q&137 ,'q!40 ; quit logging but leave file open .byte 'R&137 ,'r!40 ; resume logging if file is open .byte 'X&137 ,'X!40 ; control Q and then thats all .byte 'B&137 ,'b!40 .byte '? ,177 ; help, rub for send break .byte 'H&137 ,'h!40 .byte 0 .even 210$: .word con.$ ; unknown escape command .word con.c ,con.c ; drop connection .word con.i ,con.i ; get modems attention .word con.q ,con.q ; turn console logging off .word con.r ,con.r ; turn it back on please .word con.x ,con.x ; send XON .word con.br ,con.br ; break .word con.hl ,con.br ; print out commands .word con.hl ,con.hl ; help $bell: .byte 'G&37 $xon: .byte 'Q&37 $null2: .byte 0,0 .even .restore .dsabl lsb con.$: calls binwri ,<#$bell,#1,#lun.co> ; beep at user clr r0 return con.c: mov #1 ,r0 ; set flag to exit connect code return ; simple con.i: calls ttydtr ,<#ttname> ; try to force DTR up on the line clr r0 return con.q: bic #log$co ,trace ; turn off console logging clr r0 return con.r: bit #log$op ,trace ; if the file is open do itK11MCOMAC[.050032]K11MCO.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 beq 100$ ; no bis #log$co ,trace ; yes, enable this 100$: clr r0 return con.x: calls binwri ,<#$xon,#1,#lun.ti>; insure a control Q goes down calls ttxon ,<#ttname> clr r0 return con.br: save ; save scratch registers please clr -(sp) ; clear a sf.gmc buffer out clr -(sp) ; ditto 10$: mov sp ,r2 ; and a pointer to it please movb #tc.xsp ,@r2 ; we want the current speed settings movb #tc.rsp ,2(r2) ; ditto QIOW$S #SF.GMC,#LUN.TI,,,,, movb 1(r2) ,r1 ; save the old speed setting please mov sp ,r2 ; reset the buffer address please movb #tc.xsp ,(r2)+ ; stuff xmitter change code in movb #s.300 ,(r2)+ ; and the desired speed now movb #tc.rsp ,(r2)+ ; stuff receiver change code in movb #s.300 ,(r2)+ ; and the desired speed now mov sp ,r2 ; point back to the buffer now QIOW$S #SF.SMC,#LUN.TI,,,,, QIOW$S #IO.WAL,#LUN.TI,,,,,<#$null2,#2> mov sp ,r2 ; reset the buffer address please movb #tc.xsp ,(r2)+ ; stuff xmitter change code in movb r1 ,(r2)+ ; and the old speed now movb #tc.rsp ,(r2)+ ; stuff receiver change code in movb r1 ,(r2)+ ; and the old speed now mov sp ,r2 ; point back to the buffer now QIOW$S #SF.SMC,#LUN.TI,,,,, 100$: cmp (sp)+ ,(sp)+ ; pop local buffer and exit clr r0 ; no errors are ever returned unsave ; pop local registers and exit return ; bye con.hl::strlen #htxt calls binwri ,<#htxt,r0,#lun.co> clr r0 return .save .psect $PDATA ,D htxt: .ascii /B Try to send a break to the remote/ .ascii /C Connect back to the local Kermit-11/ .ascii /I Drop and raise DTR (for RSTS only)/ .ascii /Q Quit console logging. See SET LOG/ .ascii /R Resume console logging. See SET LOG/ .ascii /X Send XON and cancel any active XONs/ .asciz /RUBOUT Try to fake a break to the remote/ .ascii /? Print this message/ .byte 0 .even .restore .END