
* 
**    LINE PRINTER REQUEST
* 
LPR   EQU * 
      LDA PRISC     GET LP INDICATOR
      SZA,RSS       IS LP AVAILABLE?             [B]
      JMP LPR1      NO                           [B]
      LDA LPTTY     MAYBE                        [B]
      IOR TLSUP     ANYBODY                      [B]
      IOR TLPR        USING IT?                  [B]
      SZA                                        [B]
      JMP LPR1      YES                          [B]
* 
      STB LTNUM     SAVE TTY TABLE POINTER       [C]
      JSB LPSCK     CHECK LINE PRINTER STATUS    [C]
      JMP LPR1      LP NOT READY                 [C]
      SSB,RSS       2767A LP?                    [C]
      JMP LPR3      NO, 2778A OR 2610A TYPE LP   [C]
      SZA,RSS       YES, IS LP ON LINE?          [C]
      JMP LPR3      YES                          [C]
LPR1  CLA           NO                           [C]
      OTA C1        OUTPUT A = 0                 [C]
      JMP SRRTN                                  [C]
* 
LPR3  LDB LTNUM     GET POINTER                  [C]
      INB           B => CHARACTER COUNT
      STB LCCNT 
      INB           B => RUNNING BUFFER POINTER 
      STB LBPNT 
      INB           B => START OF BUFFER
      STB LBSTR 
      INB           B => START OF FIRST BUFFER
      STB LBHED 
      LDA LBPNT,I   A = THE 
      CMA,INA         STRING
      ADA LBHED,I       LENGTH
      CPA .-1       IS THERE AN OUTPUT STRING?
      RSS 
      JMP LPR4      YES 
      LDA LTNUM     NO - GET TTY# AND SET THE 
      STA TLSUP       TEMPORARY LP SUSPENSION FLAG
      OTA C1        OUTPUT A#0 (POSITIVE) 
      JMP OUTPE 
* 
LPR4  ADA .-3       A = -(STRING LENGTH + 3)
      LDB M136      IF STRING 
      ADB A           IS TOO LONG,
      SSB               REJECT THE
      JMP LPR7            REQUEST 
      STA LCCNT,I 
      LDA LBHED,I   CHANGE POINTERS 
      LDB LBSTR,I 
      STB LBHED,I     FROM THEIR INPUT POSITIONS
      LDB LBPNT,I 
      STB LBSTR,I       TO THEIR OUTPUT POSITIONS 
      ADA .-1 
      STA LBPNT,I 
      LDA .-3       SET COUNTER 
      STA STEMP       TO -3 
      LDA .+12B     A = LINE FEED 
      RSS 
LPR5  LDA .+23B     A = X-OFF 
      STA LCHAR     SAVE THE CHARACTER
      LDB LBSTR,I   B = CHARACTER ADDRESS 
      CLE,ERB       B = WORD ADDRESS
      LDA B,I       A = DESTINATION WORD
      SEZ,RSS       IF HIGH CHARACTER,
      ALF,ALF         ROTATE TO BOTTOM
      AND HIMSK     CLEAR LOWER 8 BITS
      IOR LCHAR     MERGE WITH NEW CHARACTER
      SEZ,RSS       IF HIGH CHARACTER,
      ALF,ALF         ROTATE BACK 
      STA B,I       STORE BACK IN BUFFER
      ISZ STEMP     INCREMENT AND CHECK COUNTER 
      RSS           COUNT ZERO? 
      JMP LPR6      YES 
      LDB LBSTR,I   NO - SET NEW
      INB             POINTER VALUE 
      STB LBSTR,I       AND RETURN FOR
      JMP LPR5            NEXT CHARACTER
* 
LPR6  LDB LTNUM     B => TTY# 
      STB LPTTY     SET LP USER INDICATOR 
      STB LFLAG     SET LP INITIALIZATION FLAG
      ADB .+?STAT   B => STATUS 
      LDA B,I       CHANGE
      AND IONBT       STATUS TO 
      STA B,I           OUTPUT
      CLA,INA 
      OTA C1        OUTPUT A#0 (POSITIVE) 
      LDB LTNUM     IF TERMINAL IS
      ADB .+?TYPE     A SELECTRIC - - 
      LDA B,I 
      SZA,RSS 
      JMP OUTPE 
      LDA CRCLD       OUTPUT A
      LDB LTNUM,I       CIRCLE D
      JSB IMUXR,I 
OUTPE EQU * 
      LDA .+14B     2767A PAGE EJECT CODE 
      LDB LPTYP     GET LP TYPE FLAG
      SSB           2778A OR 2610A LINE PRINTER?
      JMP PSC2      NO, 2767A 
      LDA PEJCT     YES, A = 2778A PAGE EJECT CODE
      ADA B         ADD 1 FOR 2610A CODE
PSC2  OTA 0         PAGE
PSC3  STC 0,C        EJECT
      JMP SRRTN 
* 
LPR7  OTA C1        OUTPUT A#0 (NEGATIVE) 
      JMP SRRTN 
      SPC 1 
* 
**    USER IS ABORTED 
* 
ABT   EQU * 
      ADB .+?STAT    B=> ?STAT
      LDA B,I        A=> ?STAT
      AND B71M       CLEAR STATUS BITS
      IOR IOBT       SET 'INPUT' BIT
      STA B,I        STORE NEW STATUS 
      LDB XTNUM      B=> TTY# 
      CPB LPTTY      BRANCH IF
      RSS               USER HAS LP.
      JMP SRRTN      RETURN 
* 
      LDA LPBT1     IF ERROR FLAG                [B]
      CPB LPERF       SET, RESTORE               [B]
      STA LBPNT,I       THE POINTER              [B]
      JSB LPCLR,I   CLEAR LP FLAGS               [B]
      JMP SRRTN 
      SPC 1 
* 
**    LINE PRINTER DISCONNECT 
* 
LPD   EQU * 
      CLB,INB 
      STB LPDIS     SET LP DISCONNECT FLAG
      JMP SRRTN 
      SPC 1 
* 
**    LINE PRINTER STATUS REQUEST 
* 
LPS   EQU * 
      CLA 
      LDB LPTYP     GET LP TYPE FLAG
      SSB 
      INA           PLACE TYPE
      RAR             IN BITS 14
      SLB               AND 15
      INA 
      RAR 
      IOR PRISC     ADD THE SELECT CODE 
      OTA C1          AND OUTPUT
      JMP SRRTN 
      SKP 
* 
**    START ENTER TIMING
* 
STE   EQU * 
      ADB .+?STAT   B => STATUS 
      LDA B,I       A = STATUS
      IOR ENBT      SET 'ENTER TIMING' BIT
      STA B,I 
      INB           B => ATIM 
      LDA RCODE     LOAD REQUEST WORD 
      AND B377      MASK TO TIME ALLOWED
      ALS           CONVERT 
      STA STEMP       TIME TO 
      ALS,ALS           TENTHS OF 
      ADA STEMP           A SECOND
      STA B,I       SET INTO ATIM 
      INB           B => TIMO 
      CMA,INA       A = -TIME 
      STA B,I       SET INTO TIMO 
      ADB .+?STAT-?TIMO 
      JMP IWT+1 
      SPC 1 
* 
**    FETCH NEXT BUFFER CHARACTER 
* 
FNC   EQU * 
      ADB .+?BEND   B => BUFFER END 
      STB STEMP     SAVE IT 
      ADB .+?BHED-?BEND  B => PICKUP POINTER
      LDA B,I       A => CHARACTER
      CLE,ERA       A => WORD 
      LDA A,I       A =  WORD 
      SEZ,RSS       EXTRACT 
      ALF,ALF         DESIRED 
      AND B377          CHARACTER 
      OTA C1        SEND CHARACTER TO INTERFACE 
      LDA B,I       INCREMENT CHARACTER 
      INA             ADDRESS 
      CPA STEMP,I   IF BEYOND END OF
      ADA MBLEN       BUFFER, WRAP AROUND 
      JMP SVRTN     RESET POINTER                [B]
      SPC 1 
* 
**    SET NEW PHONES TIMING VALUE 
* 
PHS   EQU * 
      LDA RCODE     GET REQUEST WORD
      AND B377      MASK TO TIME
      ALS           CONVERT 
      STA STEMP       TIME TO 
      ALS,ALS           TENTHS OF 
      ADA STEMP           A SECOND
      CMA,INA       MAKE NEGATIVE 
      STA PHR       SET TIME ALLOWED FOR LOGON
      JMP SRRTN 
      SKP 
* 
**    SET NEW BAUD RATE AND SET/RESET PARITY BIT. 
* 
SPE   EQU * 
      LDA RCODE     GET REQUEST WORD
      AND B377      MASK TO BAUD RATE 
      STA STEMP     SAVE
      ADB .+?TYPE   B=> ?TYPE 
      LDA B,I       A= ?TYPE
      ADB .+?SPRM-?TYPE  B=> ?SPRM
      STB TEMP1     SAVE IT.
      LDB A         B=?TYPE 
      LDA TEMP1,I   A= ?SPRM
      IOR BIT12     SET PARITY BIT=1. 
      SZB           SET PARITY BIT=0 FOR TYPE#1.
      AND NBT12 
      AND HIMSK     CLEAR OLD BAUD RATE 
      IOR STEMP     MERGE WITH NEW BAUD RATE
      LDB TEMP1     B=> ?SPRM 
      STA B,I       RESTORE SEND PARAMETER
      STA TEMP1     SAVE ?SPRM
      ADB .+?RPRM-?SPRM  B => RECEIVE PARAMETER 
      LDA B,I       A = RECEIVE PARAMETER 
      AND HIMSK     REMOVE OLD BAUD RATE
      IOR STEMP     MERGE NEW BAUD RATE.
      STA B,I       RESTORE RECEIVE PARAMETER 
      ADB .+?TNUM-?RPRM  B => TTY#
      LDB B,I       B = TTY#
      STB STEMP     SAVE ?TNUM
      JSB IMUXR,I   OUTPUT PARAMETER
      LDA TEMP1     A=?SPRM 
      LDB STEMP     B=?TNUM 
      JSB IMUXR,I   OUTPUT PARAMETER
      JMP SRRTN 
      SPC 1 
* 
**    SAVE BUFFER POINTER 
* 
SBP   EQU * 
      ADB .+?BHED   B => CURRENT PICKUP POINTER 
      LDA B,I       A =  CURRENT PICKUP POINTER 
      INB           B => SAVE LOCATION
      JMP SVRTN     SAVE CURRENT POINTER         [B]
      SPC 1 
* 
**    RESTORE BUFFER POINTER
* 
RBP   EQU * 
      ADB .+?BSAV        B => SAVED PICKUP POINTER
      LDA B,I            A =  SAVED PICKUP POINTER
      ADB .+?BHED-?BSAV  B => CURRENT PICKUP POINTER
      JMP SVRTN          SET PICKUP POINTER BACK [B]
      SKP 
* 
**    USER IS RUNNING 
* 
UIR   EQU * 
      ADB .+?STAT 
      LDA B,I       A = STATUS
      IOR RNBT      SET 'USER IS RUNNING' BIT 
      JMP SVRTN     STORE NEW STATUS             [B]
      SPC 1 
* 
**    USER IS NOT RUNNING 
* 
UNR   EQU * 
      ADB .+?STAT 
      LDA B,I       A = STATUS
      AND RNNBT     REMOVE 'USER IS RUNNING' BIT
      AND XONBT     REMOVE 'X-OFF' BIT
      STA B,I       STORE NEW STATUS
      ADB .+?TNUM-?STAT 
      CPB LPTTY 
      STB LPDIS 
      CPB TLSUP 
      JSB LPCLR,I                                [B]
      CPB TLPR                                   [B]
      JSB LPCLR,I                                [B]
      JMP SRRTN 
      SPC 1 
* 
**    USER IS IN INPUT WAIT - CONFIGURE FOR INPUT 
* 
IWT   EQU * 
      ADB .+?STAT   B => STATUS 
      LDA B,I       A = STATUS
      IOR IOBT      SET 'INPUT MODE' BIT
      CPA B,I       BRANCH IF USER IS 
      JMP IWT1        NOT IN OUTPUT MODE
      LDA B,I       B = STATUS
      IOR ICBT      SET 'INPUT CONFIGURATION' BIT 
      JMP SVRTN     STORE NEW STATUS             [B]
* 
IWT1  AND NINBT     REMOVE 'NO INPUT ALLOWED' BIT 
      STA B,I       STORE NEW STATUS
      ADB .+?RPRM-?STAT 
      LDA B,I           A = RECEIVE PARAMETER 
      ADB .+?TNUM-?RPRM 
      LDB B,I           B = UNIT NUMBER 
      JSB IMUXR,I    OUTPUT TO MULTIPLEXER
      JMP SRRTN 
      SKP 
* 
**
***   HANG USER UP
**
* 
*   THE LOGON TIMING IS ALLOWED TO CONTINUE FOR ILLEGAL ACCESS AND
*   THE LIKE, BEING TURNED OFF ONLY BY THE SYSTEM WHEN IT HAS 
*   COMPLETED LOGGING ON THE USER.
* 
*   THE HANG USER UP ROUTINE SETS A BIT IN HIS STATUS THAT CAUSES 
*   THE PHONES LOGIC TO HANG UP THE CLOD WHEN HE HAS STOPPED TYPING.
* 
HUU   EQU * 
      ADB .+?STAT 
      LDA B,I       A = STATUS
      IOR HUBT      SET 'HANG USER UP' BIT, REMOVE
      AND HUMSK       'USER IS RUNNING' BIT, AND
      JMP SVRTN         CLEAR TERMINAL SUBTYPE   [B]
      SPC 1 
* 
**    USER IS LOGGED ON - STOP AUTO-DISCONNECT TIMING 
* 
ULO   EQU * 
      ADB .+?STAT 
      LDA B,I       A = STATUS
      AND LTNBT     REMOVE 'LOG TIMING' BIT 
      STA B,I       STORE NEW STATUS
      ADB .+?TYPE-?STAT  B=> ?TYPE
      LDA B,I       A= ?TYPE
      SZA,RSS       WHICH TYPE? 
      JMP SRRTN     TYPE#1. 
      IOR CDBT      TYPE#2. SET CDBT BIT. 
      JMP SVRTN                                  [B]
      SPC 1 
* 
**    ECHO ON 
* 
ECO   EQU * 
      ADB .+?RPRM 
      LDA B,I       A = RECEIVE PARAMETER 
      IOR EOBIT     SET 'ECHO' BIT
      JMP SVRTN     RESTORE PARAMETER            [B]
      SPC 1 
* 
**    ECHO OFF
* 
ECF   EQU * 
      ADB .+?RPRM 
      LDA B,I       A = RECIEVE PARAMETER 
      AND EFBIT     REMOVE 'ECHO' BIT 
      JMP SVRTN     RESTORE PARAMETER            [B]
      SKP 
* 
**    TAPE MODE ON
* 
TPO   EQU * 
      ADB .+?STAT 
      LDA B,I       A = STATUS
      IOR TPBT      SET 'TAPE MODE' BIT 
      JMP SVRTN     STORE NEW STATUS             [B]
      SPC 1 
* 
**    ILLEGAL INPUT WHILE IN TAPE MODE
* 
ILI   EQU * 
      ADB .+?BPNT   B => CURRENT STORE POINTER
      LDA B,I 
      INB           B => START OF LAST LINE 
      CPA B,I       HAS A NEW LINE STARTED? 
      JMP NILI      NO
      ADB .+?STAT-?BSTR 
      LDA B,I 
      AND TPBT
      OTA C1        YES - TELL OTHER MACHINE ILLEGAL
      JMP SRRTN 
* 
NILI  ADB .+?STAT-?BSTR 
      LDA B,I       A = USER'S STATUS 
      AND TPNBT     REMOVE 'TAPE MODE' BIT
      STA B,I       STORE NEW STATUS
      CLA           TELL OTHER MACHINE
      OTA C1          NO MORE INPUT 
      JMP SRRTN 
      SPC 1 
* 
**    NEW USER CALLED 
* 
NUC   EQU * 
      ADB .+?STAT 
      LDA B,I       A = STATUS
      IOR LTBT      SET 'LOGON' BIT 
      STA B,I       STORE NEW STATUS
      ADB .+?PHON-?STAT  B => PHONES TIMING WORD
      LDA PHR       GET TIMING VALUE
      JMP SVRTN       AND STORE IN WORD          [B]
      SKP 
* 
**    KILL ALL OUTPUT 
* 
KAO   EQU * 
      CPB LPTTY     IF USER HAS LP.              [B]
      JSB LPCLR,I     REMOVE HIM                 [B]
      ADB .+?CCNT   B => CHARACTER COUNT
      CCA           SET CHARACTER 
      STA B,I         COUNT TO ONE
      ADB .+?STAT-?CCNT 
      LDA B,I       CLEAR ALL BUT 
      AND KMASK       NECESSARY BITS
      IOR IOBT
      JMP SVRTN                                  [B]
      SPC 1 
* 
**    ALLOW INPUT 
* 
ALI   EQU * 
      ADB .+?BHED 
      LDA B,I       A = CURRENT PICKUP POINTER
      INB           B => BSAV 
      STA B,I       SAVE CURRENT LOCATION 
      ADB .+?BSTR-?BSAV 
      LDA B,I       LOAD BUFFER POINTER 
      INB           B => BHED 
      CPA B,I       IS ANOTHER BUFFER FULL? 
      JMP SRRTN     NO - RETURN 
      ADB .+?TNUM-?BHED 
      LDA B,I       A = TTY#
      IOR HVL       ADD COMPLETE LINE INDICATOR 
      JSB IOMTM,I      AND TELL OTHER MACHINE 
      JMP SRRTN 
      SPC 1 
* 
**    SET USER INTO OUTPUT WAIT 
* 
OWT   EQU * 
      ADB .+?CCNT 
      LDA B,I       A = - CHARACTER COUNT 
      ADA .+10      IS CHARACTER
      SSA             COUNT <= 10?
      JMP OWTA      NO - SET OUTPUT WAIT
      ADB .+?TNUM-?CCNT  YES
      LDA B,I       B = USER'S TTY# 
      IOR BFE       ADD 'BUFFER EMPTY' CODE 
      JSB IOMTM,I      AND TELL OTHER MACHINE 
      JMP SRRTN 
* 
OWTA  ADB .+?STAT-?CCNT 
      LDA B,I       A = STATUS
      IOR STBT      SET 'STOPPED' BIT 
      JMP SVRTN     STORE NEW STATUS             [B]
      SKP 
* 
**    IS BUFFER FULL? 
* 
IBF   EQU * 
      ADB .+?CCNT 
      LDA B,I       A = CHARACTER COUNT 
      ADA BLEN      CHECK FOR BUFFER FULL 
      ADA .-2 
      RAL           LEAVE ONLY THE SIGN BIT,
      AND .+1         ONE = FULL, ZERO = NOT FULL 
      OTA C1        OUTPUT RESULT 
      JMP SRRTN 
      SPC 1 
* 
**    BACKSPACE 
* 
BKS   EQU * 
      ADB .+?BHED 
      LDA B,I       A = BUFFER POINTER
      ADB .+?BGIN-?BHED  B => BUFFER BEGINNING
      CPA B,I            IF FIRST LOCATION IN 
      ADA BLEN             BUFFER, MOVE TO END
      ADA .-1            BACK UP ONE CHARACTER
      ADB .+?BHED-?BGIN 
      JMP SVRTN          STORE NEW PICKUP POINTER[B]
      SPC 1 
* 
**    SET CHAR. SIZE. 
**    ADJUST TYPE AND ECHO BIT. 
* 
CHS   EQU * 
      LDA RCODE     GET REQ. CODE.
      AND B340      ISOLATE CHAR. SIZE. 
      ALF,RAR       ROTATE INTO BITS 8-10.
      STA STEMP     SAVE IT.
      ADB .+?TYPE   B=> ?TYPE 
      STB TEMP1     SAVE IT.
      CLB 
      SZA,RSS       SET ?TYPE TO 0 IF CHAR.SIZE NOT 
      INB           =0 AND TO 1 IF
      STB TEMP1,I   CHAR.SIZE=0.
      LDB TEMP1     B=> ?TYPE 
      ADB .+?RPRM-?TYPE  B=> ?RPRM
      STB TEMP1     SAVE IT.
      LDA B,I       A= ?RPRM
      AND MASK1 
      IOR STEMP     SET CHAR. SIZE. 
      AND NBT12     RESET ECHO BIT. 
      LDB STEMP 
      SZB           IF CHAR.SIZE NOT =0,SET ECHO. 
      IOR BIT12 
      STA TEMP1,I   SET ?RPRM 
      ISZ TEMP1 
      LDA TEMP1,I   A= ?SPRM
      AND MASK1 
      IOR STEMP 
      STA TEMP1,I   SET ?SPRM.
      JMP SRRTN 
      SPC 1 
* 
**    SERVICE ROUTINE TO SET UP THE CR AND
**    LF DELAYS IN THE TTY TABLE. 
* 
STP   EQU * 
      ADB .+?TYPE   B=> ?TYPE 
      LDA B,I       A= ?TYPE
      SZA           TYPE#1? 
      JMP SRRTN     NO. RETURN! 
      LDA RCODE     YES. A= REQ. WORD.
      ALF,ALF       ROTATE SUBTYPE INTO LOWER.
      ALF,RAR 
      AND .+7       ISOLATE.
      STA STEMP     SAVE IT.
      ADB .+?STAT-?TYPE  B=> ?STAT
      LDA B,I       A= ?STAT
      ALF           SET 
      AND MASK2 
      IOR STEMP          SUBTYPE
      ALF,ALF 
      ALF 
      STA B,I                 CODE. 
      ADB .+?RPRM-?STAT  B=> ?RPRM
      STB TEMP1     SAVE IT.
      LDA B,I       A= ?RPRM
      AND B377      GET BAUD RATE.
      ADA M277      ADJUST FOR TABLE LOOK UP. 
      LDB BAUDT     B=> BEGINNING OF TABLE. 
STP1  EQU * 
      ADA B,I 
      SSA,RSS       RIGHT RANGE?
      JMP STP2      YES.
      ADB .+7       NO. BUMP POINTER TO NEXT ENTRY. 
      JMP STP1      GO BACK.
STP2  EQU * 
      INB 
      ADB STEMP     B=> DELAY 
      LDA B,I       A= DELAY
      STA STEMP     SAVE IT.
      LDB TEMP1     B=> ?RPRM 
      ADB .+?CDLY-?RPRM  B=> ?CDLY
      ALF,ALF       GET 
      AND B377      AND 
      CMA,INA       SET 
      STA B,I       CR DELAY(NEGATIVE!).
      INB           B=> ?LDLY 
      LDA STEMP     GET 
      AND B377      AND SET LF                   [B]
      CMA,INA         DELAY (NEGATIVE)           [B]
      JMP SVRTN                                  [B]
* 
* 
*  CR DELAY IN UPPER AND LF DELAY IN LOWER. 
* 
BAUDT DEF *+1 
      OCT 75        =277-202
* 
*  DELAYS FOR 110 BAUD. 
* 
      OCT 400       FOR SUBTYPE 0.
      OCT 0         FOR SUBTYPE 1.
      OCT 0         SET UP 0 DELAY. 
      OCT 1         FOR SUBTYPE 3.
      OCT 11        FOR SUBTYPE 4.
      OCT 400       FOR SUBTYPE 5.
* 
      OCT 43        =202-137
* 
*  DELAYS FOR 150 BAUD. 
* 
      OCT 0         FOR SUBTYPE 0.
      OCT 1000      FOR SUBTYPE 1.
      OCT 400       FOR SUBTYPE 2.
      OCT 3         FOR SUBTYPE 3.
      OCT 15        FOR SUBTYPE 4.
      OCT 1000      FOR SUBTYPE 5.
* 
      OCT 60        =137-57 
* 
*  DELAYS FOR 300 BAUD. 
* 
      OCT 0         FOR SUBTYPE 0.
      OCT 2000      FOR SUBTYPE 1.
      OCT 0         SET UP 0 DELAY. 
      OCT 10        FOR SUBTYPE 3.
      OCT 34        FOR SUBTYPE 4.
      OCT 7007      FOR SUBTYPE 5.
* 
      OCT 30        =57-27
* 
*  DELAYS FOR 600 BAUD. 
* 
      OCT 0         FOR SUBTYPE 0.
      OCT 0         SET UP 0 DELAY. 
      OCT 0         SET UP 0 DELAY. 
      OCT 0         SET UP 0 DELAY. 
      OCT 67        FOR SUBTYPE 4.
      OCT 0         SET UP DELAY. 
* 
      OCT 14        =27-13
* 
*  DELAYS FOR 1200 BAUD.
* 
      OCT 4         FOR SUBTYPE 0.
      OCT 0 
      OCT 0 
      OCT 40                                     [B]
      OCT 0 
      OCT 0 
* 
      OCT 6         =13-5 
* 
*  DELAYS FOR 2400 BAUD.
* 
      OCT 4         FOR SUBTYPE 0.
      OCT 0 
      OCT 0 
      OCT 0 
      OCT 0 
      OCT 0 
      SPC 1 
* 
**    WHAT SPEED? 
* 
GRP   EQU * 
      ADB .+?RPRM   B=> ?RPRM 
      LDA B,I       A= ?RPRM
      OTA C1        TELL 2116.
      JMP SRRTN     RETURN. 
* 
      SPC 1 
* 
**    WHAT TERMINAL TYPE? 
* 
WTP   EQU * 
      ADB .+?TYPE   B=> ?TYPE 
      LDA B,I       A= ?TYPE
      OTA C1        TELL 2116.
      JMP SRRTN     RETURN. 
      SPC 1 
* 
**     I/O-TO-SYSTEM PROCESSOR CORE DUMP
* 
*  THIS ROUTINE IS USED TO SEND THE I/O PROCESSOR 
*  CORE CONTENTS TO THE SYSTEM PROCESSOR IN THE 
*  EVENT THAT A DUMP IS REQUESTED.
* 
KSN   CLB           START AT LOCATION 0 
KSN1  LDA B,I       SEND
      OTA C1          NEXT
      STC C1,C          WORD. 
      SFS C1        WAIT FOR
      JMP *-1         ACCEPTANCE. 
      INB           BUMP POINTER. 
      CPB BIT13     LAST WORD SENT? 
      CLB,RSS                                    [B]
      JMP KSN1      NO. 
      STC C2,C      YES. TELL SYSTEM THAT 
      CLC C2          WE ARE FINISHED.
      SFS C2        WAIT FOR ACKNOWLEDGMENT.
      JMP *-1 
      LDA NPORT                                  [B]
      JMP *+1,I                                  [B]
      DEF INIF2                                  [B]
SERND EQU * 
