/LINK ACCEPTOR (ASCII)
 .LOC 17000
    ASIZE
    .SIXBT 'LK'
    300001                  /INPUT
MK  7                       /MASK
AE  14                      /EOT
CR  15                      /CARRIAGE RETURN
ADEV 17                     /LINK DEV
    .SIXBT 'LKB'
ACCEPT
    SPA; JMP A5             /CLOSE ->
    LAC GET; SZA; JMP A2
    LAC ADEV; SNA; JMP A2
    RTR; RTR; RTR
    AND AL77; TAD AL300
    DAC AMESS+2
    LAC ADEV
    AND AL77; TAD AL300
    DAC AMESS+3
    LAC LAMESS; DAC GET
A1  GUARD
    LAC .LT; SZA; WAIT
    ION
    LAC* GET
    ISZ .LT; TLB1
    ISZ GET
    SMA; JMP A1
A2  JMS GET
    SPA!STL; JMP A6
    JMP* ACCEPT
A5  JMS* ACCEPT-1
A6  DZM GET
    JMP* ACCEPT
GET
    CLL!CLA; JMS* ACCEPT-1
    AND MK
    SAD CR; JMP GET+1
    SAD AE; CLC
    JMP* GET
AL77 77
AL300 300
LAMESS AMESS
AMESS 324; 240; 0 ; 0; 257; 314; 113; 600204 /T ??/LK<EOT>
ASIZE=.

/LINK SENDER (ASCII)
 .LOC 17000
    SSIZE
    .SIXBT 'LK'
    300002                  /OUTPUT
PB  10                      /PARITY BIT
SE  14                      /EOT
SDEV 17                     /LINK DEVICE
    .SIXBT 'LKB'
SEND
    SNL; JMP S5
    DAC SJ
    LAC PUT; SZA; JMP S2
    LAC SDEV; SNA; JMP S2
    RTR; RTR; RTR
    AND SL77; TAD SL300
    DAC SMESS+5
    LAC SDEV
    AND SL77; TAD SL300
    DAC SMESS+6
    LAC LSMESS; DAC SI
S1  JMS PUT
    ISZ SI
    SMA; JMP S1
S2  LAC SJ
    SAD .NL; SKP; JMP .+4
    LAC SL15; JMS PUT
    LAC SL12; JMS PUT
    JMP* SEND
S5  LAC PUT; SNA!CLC; JMP* SEND
    LAC SE; JMS PUT
S6  CLL; DZM PUT
    JMP* SEND
PUT
    DAC SK; RCR
    SZL!RCR; CML
    SZA; JMP .-3
    SZL!STL; LAC PB
    XOR SK; JMS* SEND-1
    JMP* PUT
SI;SJ;SK
SL12 12;SL15 15;SL77 77
SL300 300
LSMESS SMESS
SMESS 324; 240; 314; 113; 257; 0; 0; 600204 /T LK/??<EOT>
SSIZE=.

/LINK ACCEPTOR (BIN)
 .LOC 17000
    ABSIZE
    .SIXBT 'LKB'
    300001                  /INPUT
    .SIXBT 'N'
AB
    SPA; JMP AB5            /CLOSE ->
    GUARD
    LAC .LR; SNA!STL; WAIT
    ION
    DZM .LR; RRB1
    JMP* AB
AB5 LAC AB-1
    JMP* AB
ABSIZE=.

/LINK SENDER (BIN)
 .LOC 17000
    SBSIZE
    .SIXBT 'LKB'
    300002                  /OUTPUT
SB
    SNL; JMP* SB
    DAC SBK
    GUARD
    LAC .LT; SZA!STL; WAIT
    ION
    LAC SBK
    ISZ .LT; TLB1
    JMP* SB
SBK
SBSIZE=.

GUARD=JMS 3;WAIT=JMP 2
.LR=16000;.LT=16010;.NL=16020
TLB1=704006;TSF1=704001;TCF1=704002
RSF1=704101;RRB1=704116
 .END
