Trailing-Edge
-
PDP-10 Archives
-
BB-W661A-BM_1983
-
tools/x29pad.mac
There is 1 other file named x29pad.mac in the archive. Click here to see a list.
TITLE X29PAD
SUBTTL BY -ABDUL- AND THE DANCING BEAR
;
; COPYRIGHT (C) 1983 BY
; DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
;
; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
; ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
; OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THERE-
; OF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
; NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
;
; THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
; CORPORATION.
;
; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
;
;
SEARCH MACSYM,MONSYM,X25SYM
SALL
.DIRECT FLBLST
; VERSIONS
VWHO==0 ; LAST EDITED BY...
VMAJOR==1 ; MAJOR VERSION
VMINOR==0 ; MINOR VERSION
VEDIT==200 ; EDIT VERSION
SUBTTL SYMBOLS
S==0
T1==1
T2==2
T3==3
T4==4
P1==5
P2==6
P3==7
P4==10
P==17
; BIT DEFINITIONS FOR PAD PARAMETER #3
P03%AL==1 ; FORWARD DATA ON ALPHANUMERICS
P03%CR==2 ; FORWARD DATA ON CARRIAGE-RETURN
P03%ES==4 ; FORWARD DATA ON ESCAPE
P03%ED==10 ; FORWARD DATA ON EDITING CHARACTERS
P03%TR==20 ; FORWARD DATA ON TERMINATORS
P03%FM==40 ; FORWARD DATA ON FORMS EFFECTORS
P03%CT==100 ; FORWARD DATA ON CONTROL CHARACTERS
P03%OT==200 ; FORWARD DATA ON OTHER CHARACTERS
; BIT DEFINITIONS FOR PAD PARAMETER #7
P07%IT==1 ; SEND INTERRUPT PACKET ON BREAK
P07%RE==2 ; SEND RESET PACKET ON BREAK
P07%ID==4 ; SEND INDICATION OF BREAK
P07%ES==10 ; ESCAPE TO COMMAND MODE ON BREAK
P07%DO==20 ; DISCARD OUTPUT ON BREAK
; BIT DEFINITIONS FOR PAD PARAMETER #8
P08%NO==0 ; NORMAL DATA DELIVERY
P08%DO==1 ; DISCARD OUTPUT
; BIT DEFINITIONS FOR PAD PARAMETER #13
P13%TD==1 ; INSERT LF AFTER CR SENT TO DTE
P13%FD==2 ; INSERT LF AFTER CR SENT FROM DTE
P13%EC==4 ; INSERT LF AFTER ECHOED CR TO DTE
; INTERRUPT CHANNELS
CH.NET==0 ; NETWORK IS ON CHANNEL 0
CH%NET==1B0 ; BIT POSITION IN INTERRUPT WORD
LV.NET==2 ; LEVEL 2 INTERRUPT
CH.TMR==1 ; TIMER IS ON CHANNEL 1
CH%TMR==1B1 ; BIT POSITION IN INTERRUPT WORD
LV.TMR==2 ; LEVEL 2 INTERRUPT
CH.TTY==2 ; TTY IS ON CHANNEL 2
CH%TTY==1B2 ; BIT POSITION IN INTERRUPT WORD
LV.TTY==2 ; LEVEL 2 INTERRUPT
; ASCIZ COPYRIGHT NOTICE AND MISC. TEXT
ASCIZ\
COPYRIGHT (C) 1983 BY
DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THERE-
OF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.
DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
\
; ERROR MESSAGES AND EXPANSIONS
NETETB: -1,,[ASCIZ\%Reset seen by Gateway\]
-1,,[ASCIZ\ NO EXTRA INFO AVAILABLE\]
-1,,[ASCIZ\%PSI Gateway software are not compatible, version skew\]
-1,,[ASCIZ\%The version numbers of the TOPS20 PSI Gateway Access Software
and the TOPS20 PSI Gateway Software are not compatible. This
could be caused by the use of an old version of X25GAM.REL
when this program was loaded.\]
-1,,[ASCIZ\%Buffer too short\]
-1,,[ASCIZ\ NO EXTRA INFO AVAILABLE\]
-1,,[ASCIZ\%Buffer too long\]
-1,,[ASCIZ\ NO EXTRA INFO AVAILABLE\]
-1,,[ASCIZ\%Source DTE Subaddress too long\]
-1,,[ASCIZ\%The destination DTE Subaddress you have specified is too
long. Please check to insure that the Subaddress you have
specified is correct.\]
-1,,[ASCIZ\%Destination DTE address to long\]
-1,,[ASCIZ\%The destination DTE Address you have specified is too long.
Please check to insure that the Address you have specified is
correct.\]
-1,,[ASCIZ\%No interrupt confirmation required\]
-1,,[ASCIZ\ NO EXTRA INFO AVAILABLE\]
-1,,[ASCIZ\%Awaiting interrupt confirmation\]
-1,,[ASCIZ\ NO EXTRA INFO AVAILABLE\]
-1,,[ASCIZ\%No DTE address specified, or no destination\]
-1,,[ASCIZ\%You have not specified a destination DTE address to which
a call is to be made.\]
-1,,[ASCIZ\%No Password or Password not valid\]
-1,,[ASCIZ\%You have not specified a PASSWORD or you have specified an
incorrect PASSWORD for gaining access to the network via
the Gateway node. Please check to insure that you have given
the correct PASSWORD.\]
-1,,[ASCIZ\%Data-field truncation, field was to long\]
-1,,[ASCIZ\%The call data-field was truncated because it
was longer than the limit set by the PPSN.\]
-1,,[ASCIZ\%Facilities data-field truncated\]
-1,,[ASCIZ\%The facilities data-field was truncated because it
was longer than the limit set by the PPSN.\]
-1,,[ASCIZ\%Unknown Network name specified\]
-1,,[ASCIZ\%The network name you have specified has not been defined
in the DECnet-20 Network Management database. Please check
to insure that you have supplied the correct network name.\]
-1,,[ASCIZ\%No interrupt to read\]
-1,,[ASCIZ\ NO EXTRA INFO AVAILABLE\]
-1,,[ASCIZ\%No data to read\]
-1,,[ASCIZ\ NO EXTRA INFO AVAILABLE\]
-1,,[ASCIZ\%X25 Port failed, procedure error\]
-1,,[ASCIZ\%The TOPS20 PSI Gateway Software encountered a procedure
error while trying to execute a Gateway request. This
could be caused by the Gateway node being inaccessable.\]
-1,,[ASCIZ\%Insufficient resources\]
-1,,[ASCIZ\%X29PAD could not obtain a circuit from the Network
Management Software. This could be caused by insufficient
DECnet Resources in the system the lack of a response by
the Network Management Software in a reasonable amount of
time. The lack of a timely response by the Network Management
Software could be caused by another user requesting a service
from the Network Management Software. You should try again.\]
-1,,[ASCIZ\%Insufficient gateway resources\]
-1,,[ASCIZ\ The PSI Gateway did not have sufficient resources to allocate a new
switched circuit. This could happen when all the circuits are being
used by others or by a problem in the Gateway. You should try again.\]
PORTST:
-1,,[ASCIZ\UNDEFINED\]
-1,,[ASCIZ\OPEN\]
-1,,[ASCIZ\CALLING\]
-1,,[ASCIZ\LISTENING\]
-1,,[ASCIZ\CALLED\]
-1,,[ASCIZ\RUNNING\]
-1,,[ASCIZ\SYNC\]
-1,,[ASCIZ\UNSYNC\]
-1,,[ASCIZ\CLEARING\]
-1,,[ASCIZ\CLEARED\]
-1,,[ASCIZ\ERROR\]
-1,,[ASCIZ\NO COMMUNICATION\]
; X.25 CLEARING CAUSE FIELD DIAGNOSTIC DATA DEFINITION
CCAUSE:
^D1,,[ASCIZ\?Call not completed - Remote DTE number is busy\]
^D3,,[ASCIZ\?Call not completed - Invalid facility request\]
^D5,,[ASCIZ\?Call not completed - Network congestion\]
^D9,,[ASCIZ\?Call not completed - Remote DTE number is out of order\]
^D11,,[ASCIZ\?Call not completed - Access barred\]
^D13,,[ASCIZ\?Call not completed - Not obtainable\]
^D17,,[ASCIZ\?Call not completed - Remote procedure error\]
^D19,,[ASCIZ\?Call not completed - Local procedure error\]
^D21,,[ASCIZ\?Call not completed - RPOA out of order\]
^D25,,[ASCIZ\?Call not completed - Reverse charging acceptance not subscribed to\]
^D33,,[ASCIZ\?Call not completed - Incompatible destination\]
^D41,,[ASCIZ\?Call not completed - Fast select acceptance not subscribed to\]
0,,0 ; END OF TABLE
; ASSEMBLY SWITCHES
IFNDEF L.CNT%,L.CNT%==200 ; COUNT OF CHARS BEFORE UPDATING LOG
IFNDEF PDLEN,PDLEN==1000 ; LENGTH OF PUSHDOWN STACK
IFNDEF CMDBSZ,CMDBSZ==^D100 ; LENGTH OF COMMAND TEXT BUFFER
IFNDEF ATMBSZ,ATMBSZ==^D50 ; LENGTH OF ATOM BUFFER
IFNDEF DTENUM,DTENUM==200 ; MAX NUMBER OF LOGICAL HOST NAMES
IFNDEF PKTSIZ,PKTSIZ==^D128 ; X.25 NETWORK PACKET SIZE
IFNDEF TMPLEN,TMPLEN==1000 ; LENGTH OF NETWORK ISR STACK
IFNDEF TTPLEN,TTPLEN==1000 ; LENGTH OF TERMINAL ISR STACK
IFNDEF NTPLEN,NTPLEN==1000 ; LENGTH OF NETWORK ISR STACK
SUBTTL USEFUL MACRO DEFINITIONS
; PARSE A STRING OF NOISE WORDS
DEFINE NOISE (STRING) <
MOVEI T2,[FLDDB. .CMNOI,,<-1,,[ASCIZ\STRING\]>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR > ; DEFINITION OF NOISE
; OBTAIN CONFIRMATION, AN END OF LINE INDICATION. TIE OFF COMMAND LINE
DEFINE CONFIRM <
MOVEI T2,[FLDDB. .CMCFM]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
SKIPE LOGJFN
CALL LOG
SKIPE .TAKEF
CALL .TECC > ; DEFINITION OF CONFIRM
; BUILD THE COMMAND TABLE
DEFINE TBL (NAME,FLAGS,DISP) <
IFNB <DISP>,<..DISP==DISP> ; ; IF A DISPATCH IS GIVEN, USE IT
IFB <DISP>,<..DISP==.'NAME> ; ; IF NONE, DEFAULT TO .NAME
IFB <FLAGS>,<[ASCIZ\NAME\],,..DISP> ; ; IF NO FLAGS, ASSEMBLE JUST THE NAME
IFNB <FLAGS>,<[FLAGS!CM%FW ; ; IF FLAGS, USE THEM AND SET CM%FW
ASCIZ\NAME\],,..DISP> ; ;
PURGE ..DISP > ; TBL MACRO
SUBTTL DATA STORAGE AREA
PDLIST: BLOCK PDLEN ; PUSHDOWN LIST
SAVPDL: 0 ; SAVE PUSHDOWN POINTER IN CASE OF
NETPDL: BLOCK NTPLEN ; NETWORK ISR STACK
TMRPDL: BLOCK TMPLEN ; TIMER ISR STACK
TTYPDL: BLOCK TTPLEN ; TERMINAL ISR STACK
NETACS: BLOCK 20 ; NETWORK ISR AC STORAGE
TMRACS: BLOCK 20 ; TIMER ISR AC STORAGE
TTYACS: BLOCK 20 ; TERMINAL ISR AC STORAGE
; REPARSE
CORBEG==. ; THIS STORAGE IS ZEROED AT START
; STORAGE USED BY COMND
CMDBUF: BLOCK CMDBSZ ; COMMAND BUFFER
ATMBUF: BLOCK ATMBSZ ; ATOM BUFFER
GTJBLK: BLOCK .GJATR+1 ; GTJFN BLOCK
; STORAGE USED BY THE PUSH COMMAND
EXCJFN: 0 ; JFN FOR PUSH
FKHAN: 0 ; FORK HANDLE FOR PUSH
; TERMINAL MODE STORAGE
OMODE: BLOCK 1 ; ORIGINAL RFMOD WORD
OCCOC: BLOCK 2 ; ORIGINAL CCOC WORDS
OTIW: BLOCK 1 ; ORIGINAL TERMINAL INTERRUPT WORD
NMODE: BLOCK 1 ; CURRENT RFMOD WORD, STORED ON ESCAPE
NCOUNT: BLOCK 1 ; NUMBER OF MSGS TO READ BETWEEN CHECKS
; FOR TTY ACTIVITY IN THE NETWORK
; ROUTINES
; NETWORK STORAGE
ACDBLK: BLOCK ^D16/4+1 ; STORAGE FOR CALL ACCEPT DATA
ACDCNT: BLOCK 1 ; COUNT OF BYTES IN ACCEPT DATA
CLDBLK: BLOCK 4 ; STORAGE FOR USER CLEAR DATA
CLSGRP: BLOCK 4 ;
CUSGRP: BLOCK 4 ;
; THE FOLLOWING THREE BLOCKS MUST REMAIN TOGETHER AND IN ORDER
DTENAM: BLOCK 4 ; DTE NAME BLOCK
DTEADR: BLOCK 4 ; DTE ADDRESS STRING BLOCK
DTESUB: BLOCK 4 ; DTE SUBADDRESS STRING BLOCK
DTESTR: BLOCK 10 ; BUFFER FOR FULL DTE ADDR/SUBADDR
ERRFLG: BLOCK 1 ; FLAG FOR LONG OR SHORT ERROR MSG
ESCFLG: BLOCK 1 ; INDICATION OF ESCAPE FLAG
FACBLK: BLOCK ^D64/4+1 ;
FACCNT: BLOCK 1 ; NUMBER OF BYTES IN FACILITIES DATA
LASTNE: BLOCK 1 ; LAST NETWORK ERROR
NETNAM: BLOCK 4 ; STORAGE FOR NETWORK NAME
; (16 CHARACTERS MAX)
NETPSW: BLOCK 4 ; STORAGE FOR ACCESS PASSWORD
; (16 CHARACTERS MAX)
NTOBUF: BLOCK <PKTSIZ/4>+1 ; BUFFER FOR OUTGOING NETWORK MESSAGES
PRTBLK: BLOCK <PKTSIZ/4>+^D140 ; PORT WORK SPACE
PORTNO: BLOCK 1 ; GATEWAY PORT NUMBER IN USE
RADFLG: BLOCK 1 ; NOTE THAT A CALL TO X%RAD WAS DONE
RCVSIZ==^D200
RCVBUF: BLOCK <RCVSIZ/4>+1 ; RECEIVE BUFFER FOR X%RDM DATA
TTIBUF: BLOCK <PKTSIZ/4>+1 ; TERMINAL INPUT BUFFER
TTICNT: BLOCK 1 ; COUNT OF CHARACTERS IN TTIBUF
TTIPTR: POINT 8,TTIBUF ; CURRENT POINTER INTO TTIBUF
TTOBUF: BLOCK <RCVSIZ/5>+1 ; TERMINAL OUTPUT HOLDING BUFFER
TTYFLG: BLOCK 1 ; INDICATE THAT THE TERMINAL ISR
; HAS INDUCED THE INTERRUPT ON THE
; TIMER CHANNEL
UCDBLK: BLOCK 4 ;
USRGRP: BLOCK 4 ; (16 CHARACTERS MAX)
; PROGRAM STATISTICS
XMTCHR: 0 ; NUMBER OF CHARACTERS TRANSMITTED
RCVCHR: 0 ; NUMBER OF CHARACTERS RECEIVED
XMTPKT: 0 ; NUMBER OF PACKETS TRANSMITTED
RCVPKT: 0 ; NUMBER OF PACKETS RECEIVED
SESTIM: BLOCK 2 ; SESSION START TIME
CALLCT: 0 ; CALL/CLEAR INTERLOCK
EDTFLG: BLOCK 1 ; EDITING MODE FLAG
.DECHO: 0 ; DEFAULT ECHO ENABLE
.DERRE: 0 ; DEFAULT ERROR ENABLE
.TPNT: 0 ; STRING POINTER FOR TAKE
.TERRE: 0 ; TEMP ERROR ENA
.TECHO: 0 ; TEMP ECHO ENA
.TIJFN: 0 ; TEMP TAKE STORAGE
.TOJFN: 0 ; TEMP TAKE OUTPUT JFN
ERRCNT: 0 ; ERROR FLAG
ERRENA: 0 ; ERROR ENABLE FLAG
ECHOEN: 0 ; ECHO ENA FLAG
.TAKEF: 0 ; TAKE FLAG
.TPSAV: 0 ; SAVE P FOR TAKE
DTEDAT: BLOCK DTENUM*^D12 ; RESERVE DTENUM ^D12 WORD BLOCKS
DTEEND==.
; DEFINE COMMAND TEMPORARY STROAGE
DFHOST: BLOCK 4 ; HOLDING BUFFER FOR REMOTE HOST NAME
DFDTEA: BLOCK 4 ; HOLDING BUFFER FOR DTE ADDRESS
DFDTES: BLOCK 4 ; HOLDING BUFFER FOR DTE SUBADDRESS
COREND==.-1 ; END OF CORE TO ZERO AT START-UP
GENRIC: FLDDB. .CMCFM ; GENERIC CONFIRM .FLDDB
INJFN: .PRIIN ; INPUT JFN
OUTJFN: .PRIOU ; OUTPUT JFN
USRDAT: BYTE (8)1,0,0,0 ; PROTOCOL ID. == X.29 REQUEST
USRDSZ==4 ; SIZE OF FIELD
BRKCHR: "X"-100 ; CHARACTER USER TO INITIATE A BREAK
ESCCHR: "\"-100 ; CHARACTER USED TO ESCAPE TO COMMAND
; MODE
STSCHR: "A"-100 ; CHARACTER USED TO DISPLAY LINK STATUS
INIPTR: POINT 8,TTIBUF ; INITIAL POINTER INTO TTIBUF
; ARGUMENT BLOCKS FOR X.25 SUBROUTINE CALLS
; ARGUMENT BLOCK FOR THE X%CIM CALL
CIMBLK: 0 ; PORT NUMBER
0 ; ERROR CODE RETURN
; ARGUMENT BLOCK FOR THE X%CSC CALL
CSCBLK: 0 ; PORT NUMBER
0 ; ERROR CODE RETURN
0 ; DTE CLEAR CAUSE
POINT 7,CLSGRP ; POINTER TO CLOSED USER GROUP
0,,FACBLK ; LENGTH,,ADDR OF FACILITIES BLOCK
0,,CLDBLK ; LENGTH,,ADDR OF USER CLEAR DATA BLOCK
; ARGUMENT BLOCK FOR THE X%ISC CALL
ISCBLK: CH.NET,,PRTBLK ; NETWORK PSI CHN,,PORT BLOCK
0 ; ERROR CODE RETURN
POINT 7,NETNAM ; POINTER TO NETWORK NAME STRING
POINT 7,NETPSW ; POINTER TO NETWORK PASSWORD
POINT 7,DTEADR ; POINTER TO DTE ADDRESS
POINT 7,DTESUB ; POINTER TO THE DTE SUBADDRESS
POINT 7,USRGRP ; POINTER TO USER GROUP
0,,FACBLK ; LENGTH,,ADDR OF FACILITIES BLOCK
0,,UCDBLK ; LENGTH,,ADDR OF USER CALL DATA BLOCK
; ARGUMENT BLOCK FOR THE X%RAD CALL
RADBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
POINT 7,CUSGRP ; POINTER TO CLOSED USER GROUP
0 ; LENGTH,,ADDR OF BLK TO PUT FACILITIES
; DATA IN
0 ; LENGTH,,ADDR OF BLK TO PUT DATA FROM
; REMOTE DTE IN
; ARGUMENT BLOCK FOR THE X%RCD CALL
RCDBLK: 0 ; PORT NUMBER
0 ; ERROR CODE RETURN
0 ; DTE CLEAR CAUSE
POINT 7,CLSGRP ; POINTER TO CLOSED USER GROUP
0,,FACBLK ; LENGTH,,ADDR OF FACILITIES BLOCK
0,,CLDBLK ; LENGTH,,ADDR OF USER CLEAR DATA BLOCK
; ARGUMENT BLOCK FOR THE X%RDM CALL
RDMBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
0 ; MORE-DATA BITS,,BYTES RECEIVED
0 ; DESTINATION OUTPUT DESIGNATOR
; ARGUMENT BLOCK FOR THE X%RIM CALL
RIMBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
0 ; ADDR OF WORD WHERE INTERRUPT BYTE IS
; RETURNED
; ARGUMENT BLOCK FOR THE X%RPS CALL
RPSBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
0 ; LAST FATAL ERROR,,CURRENT PORT STATE
0 ; INTERRUPT BIT MASK,,PACKET SIZE
; ARGUMENT BLOCK FOR THE X%RRD CALL
RRDBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
0 ; RESET CAUSE,,DIAGNOSTIC BYTE
; ARGUMENT BLOCK FOR THE X%RVC CALL
RVCBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
0 ; DIAGNOSTIC BYTE
; ARGUMENT BLOCK FOR THE X%SDM CALL
SDMBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
0 ; MORE-DATA BITS,,NUMBER OF DATA BYTES
0 ; SOURCE DESIGNATOR
; ARGUMENT BLOCK FOR THE X%SIM CALL
SIMBLK: 0 ; PORT NUMBER
0 ; RETURN CODE
0 ; INTERRUPT DATA BYTE
; ARGUMENT BLOCK FOR THE X%TPA CALL
TPABLK: 0 ; PORT NUMBER
0 ; RETURN CODE
; PAD PARAMETER BLOCK
;
; FORMAT: LH = FLAGS
; RH = VALUE
PF%WRT==1B0 ; BIT INDICATING WHO SET THIS PARAMETER
; 0 IF SET BY X29PAD
; 1 IF SET BY REMOTE HOST
PF%SET==1B1 ; 0 IF NEVER SET
; 1 IF SET BY SOMEONE
PADBLK: PADLEN ; LENGTH OF PAD TABLE
PAD.1: 0 ; ESCAPE TO COMMAND LEVEL
PAD.2: 0 ; ECHO MODE
PAD.3: 0 ; DATA FORWARDING
PAD.4: 0 ; IDLE TIMER DELAY
PAD.5: 0 ; ANCILLARY DEVICE CONTROL
PAD.6: 0 ; CNTRL. OF PAD CONTROL SIGNALS
PAD.7: 0 ; ACTION ON BREAK
PAD.8: 0 ; DISCARD OUTPUT
PAD.9: 0 ; CARRIAGE RETURN PADDING
PAD.10: 0 ; LINE FOLDING
PAD.11: 0 ; LINE SPEED
PAD.12: 0 ; FLOW CONTROL
PAD.13: 0 ; LF INSERTION AFTER CR
PAD.14: 0 ; LINE-FEED PADDING
PAD.15: 0 ; EDITING
PAD.16: 0 ; CHARACTER DELETE
PAD.17: 0 ; LINE DELETE
PAD.18: 0 ; LINE DISPLAY
PADLEN==<.-PADBLK>-1
; INITIAL PAD VALUES
; NOTE THAT THESE ARE THE X.28 SIMPLE STANDARD PROFILE PARAMETERS
IPD.1: ^D1 ; ESCAPE IS POSSIBLE
IPD.2: ^D1 ; ECHO IS DONE LOCALLY
IPD.3: ^D126 ; DATA-FORWARDING IS ON ALL CHARS
IPD.4: ^D0 ; IDLE-TIMER IS DISABLED
IPD.5: ^D1 ; FLOW-CONTROL IS ENABLED
IPD.6: ^D1 ; CNTRL. OF PAD CONTROL SIGNALS
IPD.7: ^D2 ; ACTION-ON-BREAK IS RESET
IPD.8: ^D0 ; NORMAL DATA DELIVERY
IPD.9: ^D0 ; <CR> PADDING IS DISABLED
IPD.10: ^D0 ; LINE WIDTH IS 0
IPD.11: ^D2 ; RATE IS 9600 BAUD
IPD.12: ^D1 ; FLOW-CONTROL IS ENABLED
IPD.13: ^D0 ; NO <LF> INSERTION
IPD.14: ^D0 ; <LF> PADDING IS DISABLED
IPD.15: ^D0 ; LOCAL EDITING IS DISABLED
IPD.16: 177 ; DELETE CHAR IS <DEL>
IPD.17: 025 ; LINE DELETE CHAR IS <^U>
IPD.18: 022 ; LINE DISPLAY CHARACTER IS <^R>
; TERMINAL CHARACTER SET TABLE USED FOR LOCAL ECHOING
.ASCII:
P03%CT,,$TOCTL ; CONTROL-@
P03%CT,,$TOCTL ; CONTROL-A
P03%CT,,$TOCTL ; CONTROL-B
P03%TR,,$TOCTL ; CONTROL-C
P03%TR,,$TOCTL ; CONTROL-D
P03%ES,,$TOCTL ; CONTROL-E
P03%ES,,$TOCTL ; CONTROL-F
P03%ES,,$TOCHR ; CONTROL-G
P03%CT,,$TOCTL ; CONTROL-H
P03%FM,,$TOCHR ; CONTROL-I
P03%FM,,$TOCHR ; <LF>
P03%FM,,$TOCTL ; CONTROL-K
P03%FM,,$TOCTL ; CONTROL-L
P03%CR,,$TOCAR ; <CR>
P03%CT,,$TOCTL ; CONTROL-N
P03%CT,,$TOCTL ; CONTROL-O
P03%CT,,$TOCTL ; CONTROL-P
P03%CT,,$TOCTL ; CONTROL-Q
P03%ED,,$TOCTL ; CONTROL-R
P03%CT,,$TOCTL ; CONTROL-S
P03%CT,,$TOCTL ; CONTROL-T
P03%CT,,$TOCTL ; CONTROL-U
P03%CT,,$TOCTL ; CONTROL-V
P03%CT,,$TOCTL ; CONTROL-W
P03%ED,,$TOCTL ; CONTROL-X
P03%CT,,$TOCTL ; CONTROL-Y
P03%CT,,$TOCTL ; CONTROL-Z
P03%ES,,$TOESC ; <ESC>
P03%CT,,$TOCTL ; CONTROL-\
P03%CT,,$TOCTL ; CONTROL-]
P03%CT,,$TOCTL ; CONTROL-^
P03%CT,,$TOCTL ; CONTROL-_
P03%OT,,$TOCHR ; <SP>
P03%OT,,$TOCHR ; !
P03%OT,,$TOCHR ; "
P03%OT,,$TOCHR ; #
P03%OT,,$TOCHR ; $
P03%OT,,$TOCHR ; %
P03%OT,,$TOCHR ; &
P03%OT,,$TOCHR ; '
P03%OT,,$TOCHR ; (
P03%OT,,$TOCHR ; )
P03%OT,,$TOCHR ; *
P03%OT,,$TOCHR ; +
P03%OT,,$TOCHR ; ,
P03%OT,,$TOCHR ; -
P03%OT,,$TOCHR ; .
P03%OT,,$TOCHR ; /
P03%AL,,$TOCHR ; 0
P03%AL,,$TOCHR ; 1
P03%AL,,$TOCHR ; 2
P03%AL,,$TOCHR ; 3
P03%AL,,$TOCHR ; 4
P03%AL,,$TOCHR ; 5
P03%AL,,$TOCHR ; 6
P03%AL,,$TOCHR ; 7
P03%AL,,$TOCHR ; 8
P03%AL,,$TOCHR ; 9
P03%OT,,$TOCHR ; :
P03%OT,,$TOCHR ; ;
P03%OT,,$TOCHR ; <
P03%OT,,$TOCHR ; =
P03%OT,,$TOCHR ; >
P03%OT,,$TOCHR ; ?
P03%OT,,$TOCHR ; @
P03%AL,,$TOCHR ; A
P03%AL,,$TOCHR ; B
P03%AL,,$TOCHR ; C
P03%AL,,$TOCHR ; D
P03%AL,,$TOCHR ; E
P03%AL,,$TOCHR ; F
P03%AL,,$TOCHR ; G
P03%AL,,$TOCHR ; H
P03%AL,,$TOCHR ; I
P03%AL,,$TOCHR ; J
P03%AL,,$TOCHR ; K
P03%AL,,$TOCHR ; L
P03%AL,,$TOCHR ; M
P03%AL,,$TOCHR ; N
P03%AL,,$TOCHR ; O
P03%AL,,$TOCHR ; P
P03%AL,,$TOCHR ; Q
P03%AL,,$TOCHR ; R
P03%AL,,$TOCHR ; S
P03%AL,,$TOCHR ; T
P03%AL,,$TOCHR ; U
P03%AL,,$TOCHR ; V
P03%AL,,$TOCHR ; W
P03%AL,,$TOCHR ; X
P03%AL,,$TOCHR ; Y
P03%AL,,$TOCHR ; Z
P03%OT,,$TOCHR ; [
P03%OT,,$TOCHR ; \
P03%OT,,$TOCHR ; ]
P03%OT,,$TOCHR ; ^
P03%OT,,$TOCHR ; _
P03%OT,,$TOCHR ; /
P03%AL,,$TOCHR ; a
P03%AL,,$TOCHR ; b
P03%AL,,$TOCHR ; c
P03%AL,,$TOCHR ; d
P03%AL,,$TOCHR ; e
P03%AL,,$TOCHR ; f
P03%AL,,$TOCHR ; g
P03%AL,,$TOCHR ; h
P03%AL,,$TOCHR ; i
P03%AL,,$TOCHR ; j
P03%AL,,$TOCHR ; k
P03%AL,,$TOCHR ; l
P03%AL,,$TOCHR ; m
P03%AL,,$TOCHR ; n
P03%AL,,$TOCHR ; o
P03%AL,,$TOCHR ; p
P03%AL,,$TOCHR ; q
P03%AL,,$TOCHR ; r
P03%AL,,$TOCHR ; s
P03%AL,,$TOCHR ; t
P03%AL,,$TOCHR ; u
P03%AL,,$TOCHR ; v
P03%AL,,$TOCHR ; w
P03%AL,,$TOCHR ; x
P03%AL,,$TOCHR ; y
P03%AL,,$TOCHR ; z
P03%OT,,$TOCHR ; {
P03%OT,,$TOCHR ; }
P03%OT,,$TOCHR ; |
P03%OT,,$TOCHR ; ~
P03%ED,,$TODEL ; <del>
; DTE ADDRESS TABLE FOR COMND
DTETAB: 0,,DTENUM ; EMPTY TABLE,,MAX TABLE SIZE
BLOCK DTENUM ; RESERVE TABLE SPACE
;SOFTWARE INTERUPT TABLES AND STORAGE
CHNTAB: LV.NET,,$NETIN ; X25 INTERUPT POINTER
LV.TMR,,$TIMER ; TIMERS INTERUPT CHANEL
LV.TTY,,$TTYIN ; TTY's INPUT CHANNEL
CH.CNT==.-CHNTAB ; RESURVE THE REST OF THE CHANNELS
CH.FRE==^D36-CH.CNT
BLOCK CH.FRE
LEVTAB: PCWORD
PCWORD+1
PCWORD+2
PCWORD: BLOCK 3
; COMMAND STATE BLOCK
CMDBLK: 0
0
0
-1,,CMDBUF ; POINTER TO START OF TEXT BUFFER
-1,,CMDBUF ; POINTER TO START OF NEXT INPUT
CMDBSZ*5-1 ; SIZE OF COMMAND BUFFER IN BYTES
0 ; NUMBER OF UNPARSED CHARACTERS
-1,,ATMBUF ; POINTER TO START OF ATOM BUFFER
ATMBSZ*5-1 ; SIZE OF ATOM BUFFER IN BYTES
GTJBLK ; POINTER TO GTJFN BLOCK
SUBTTL COMMAND DISPATCH AND COMMAND TABLE
START: SETZM REENF ; CLEAR REENTER FLAG
RESET ; INITIALIZE ALL I/O
MOVE P,[IOWD PDLEN,PDLIST] ; INITIALIZE STACK POINTER
SETZM CORBEG ; INITIALIZE DATA AREA
MOVE T1,[CORBEG,,CORBEG+1]
BLT T1,COREND
HRRZI T1,DTENUM ; GET MAX DTETAB TABLE SIZE
MOVEM T1,DTETAB ; AND STORE IT
MOVEI T1,CMRPRS ; FLAGS AND ADDRESS OF REPARSE ROUTINE
MOVEM T1,CMDBLK ; RESTORE COMAND BLOCK REPARSE
MOVE T1,[.PRIIN,,.PRIOU] ; JFNS FOR COMMAND I/O
MOVEM T1,CMDBLK+1 ; RESTORE INPUT OUTPUT POINTERS
HRRZM T1,OUTJFN ; UPDATE OUTPUT JFN
HLRZM T1,INJFN ; UPDATE INPUT JFN
HRROI T1,[ASCIZ\X29PAD>\] ; CTRL/R BUFFER
MOVEM T1,CMDBLK+2 ; UPDATE CTRL/R BUFFER
SETZM .TAKEF ; CLEAR TAKE FLAG
SKIPE REENF ; DID WE REENTER
JRST XLOOP ; YES, GO DIRECTLY TO LOOP
SETZM .DECHO ; CLEAR DEFAULT ECHO
SETZM .DERRE ; CLEAR DEFAULT ERROR
SETZM LOGJFN ; CLEAR LOG JFN
SETOM L.SUPP ; DEFAULT SUPPRESS NULLS
MOVX GJ%FOU!GJ%MSG ; GET JFN TYPE
MOVEM .LJBLK ; LOG SUPERSEDE AS DEFAULT
MOVEI T1,.FHSLF
MOVE T2,[LEVTAB,,CHNTAB]
SIR ; SET ADDRESSES OF TABLES
CIS ; CLEAR INT SYSTEM
EIR ; ENABLE IT
CALL INIPAD ; INIT THE PAD PARAMETER BLOCK
CALL TAKER ; TAKE PS:<DIRECTORY>X29PAD.INIT
CALL .IVERH ; PRINT VERSION NUMBER
XLOOP:
CALL GETCMD ; GET A COMMAND AND RUN IT
JRST XLOOP ; GO BACK TO GO
GETCMD:
MOVEI T1,CMDBLK ; POINT TO STATE BLOCK
MOVEI T2,[FLDDB. .CMINI] ; INITIALIZE STATE BLOCK, WATCH FOR
COMND ; CTRL/H, DO OUTPUT PROMPT
ERCAL FATAL ; THIS SHOULD NEVER HAPPEN
MOVEM P,SAVPDL ; SAVE STACK POINTER FOR REPARSE
CMRPRS: MOVE P,SAVPDL ; RESTORE STACK POINTER FOR REPARSE
PUSH P,T1 ; SAVE T1
SETO T1, ; CLEAR ANY UNOPENED FORKS
RLJFN
SKIP ; IGNORE ANY ERRORS
POP P,T1 ; RETORE T1
MOVEI T2,[FLDDB. .CMKEY,,CMDTAB,<a command,>,,.CMFRD]
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T3,T3 ; GET FDB USED
HRRZ T2,T2 ; CLEAR LEFT HALF OF T2
HRRZ T2,(T2) ; GET THE COMMAND DISPATCH
CAIE T3,.CMFRD ; DID HE JUST TYPE A CRLF
JRST (T2) ; NO, AND GO DO IT
SKIPE LOGJFN
CALL LOG
SKIPE .TAKEF ; ARE WE DOING A TAKE
JRST .TECC ; YES, GO ECHO
RET ; NO
; COMMAND TABLE
CMDTAB: CMDTBL,,CMDTBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRIES
TBL (BREAK)
TBL (CALL)
TBL (CLEAR)
TBL (CLOSE)
TBL (CONTINUE)
TBL (DEFINE)
TBL (EXIT)
TBL (HELP)
TBL (INFORMATION)
TBL (LOG)
TBL (PUSH)
; TBL (RESET)
TBL (SET)
TBL (TAKE)
CMDTBL==<.-CMDTAB>-1 ; NUMBER OF ENTRIES IN THE TABLE
; HERE TO INITIALIZE THE PAD PARAMETERS TO A KNOWN STATE
INIPAD:
MOVE T1,[IPD.1,,PAD.1]
BLT T1,PAD.18 ; MOVE IPD.* TO PAD.*
RET
SUBTTL BREAK COMMAND
; HERE TO PROCESS THE BREAK COMMAND
.BREAK:
NOISE (and continue the call)
CONFIRM
SKIPE ESCFLG ; IS THERE A CALL TO CONTINUE?
JRST .BREA0 ; YES, CONTINUE ON
HRROI T1,[ASCIZ\?There is no call to continue\]
CALL .SOUTR
RET
.BREA0: HRRZ T2,PAD.7 ; GET ACTION-ON-BREAK PARAMETER
JUMPE T2,.BREA1 ; NO ACTION, IGNORE
TXNE T2,P07%ES ; ESCAPE TO COMMAND MODE?
RET ; YES, JUST RETURN
TXNE T2,P07%IT ; SEND INTERRUPT MESSAGE?
CALL .BRINT ; YES
TXNE T2,P07%ID ; SEND INDICATION OF BREAK?
CALL .BRIDB ; YES
TXNE T2,P07%DO ; DISCARD OUTPUT?
CALL .BRDIS ; YES
TXNE T2,P07%RE ; SEND RESET?
CALL .BRRES ; YES
.BREA1: JRST .CONT1 ; NOW CONTINUE THE CALL
; HERE TO SEND AN INTERRUPT MESSAGE TO THE REMOTE-HOST
.BRINT:
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,SIMBLK ; STORE IT
SETZM SIMBLK+1 ; CLEAR RETURN STATUS
SETZM SIMBLK+2 ; SEND A NULL BYTE
MOVEI T1,SIMBLK ; POINT TO ARG BLOCK
CALL X%SIM## ; AND SEND INTERRUPT
HRRZ T1,SIMBLK+1 ; GET RETURN STATUS
CAIN T1,XC%SUC ; SUCCESS?
RET ; YES, RETURN
MOVEM T1,LASTNE ; NO, SAVE THE RETURN CODE
CALL NETERR ; REPORT THE ERROR
RET ; AND RETURN
; HERE TO DISCARD OUTPUT
.BRDIS:
MOVE T1,[PF%WRT!P08%DO] ; GET THE DISCARD OUTPUT BIT
MOVEM T1,PAD.8 ; AND STORE IT
MOVEI T1,.PRIOU ; GET OUTPUT DESIGNATOR
CFOBF ; CLEAR OUTPUT BUFFER
ERCAL FATAL
RET ; AND RETURN
; HERE TO SEND INDICATION OF BREAK TO THE REMOTE-HOST
.BRIDB:
PUSH P,T1
PUSH P,T2
PUSH P,T3
SETZ T3,
MOVE T1,[POINT 8,NTOBUF] ; GET POINTER TO MESSAGE BUFFER
MOVEI T2,3 ; INDICATION OF BREAK MSG #
IDPB T2,T1 ; STORE IT
AOS T3 ; COUNT IT
HRRZ T2,PAD.7 ; GET ACTION-ON-BREAK PARAMETER
TXNN T2,P07%DO ; DISCARD OUTPUT?
JRST .BRID1 ; NO, JUST SEND INDICATION OF BREAK
MOVEI T2,^D8 ; GET PARAMETER #8
IDPB T2,T1 ; STORE IT
AOS T3 ; COUNT IT
MOVEI T2,P08%DO ; DISCARDING OUTPUT
IDPB T2,T1 ; STORE IT
AOS T3 ; COUNT IT
.BRID1: HRRZ T2,PORTNO ; GET THE PORT NUMBER
MOVEM T2,SDMBLK ; STORE IT
SETZM SDMBLK+1 ; CLEAR THE RETURN STATUS
TXO T3,XM%QUA ; SET QUALIFIED DATA BIT
MOVEM T3,SDMBLK+2 ; STORE COUNT AND BITS
MOVE T2,[POINT 8,NTOBUF] ; POINT TO MESSAGE
MOVEM T2,SDMBLK+3 ; STORE IT
MOVEI T1,SDMBLK ; POINT TO ARG BLOCK
CALL X%SDM
HRRZ T1,SDMBLK+1 ; GET RETURNED STATUS
CAIN T1,XC%SUC ; SUCCESSFUL?
JRST .BRID2 ; YES
MOVEM T1,LASTNE ; NO, STORE THE ERROR
CALL NETERR ; REPORT IT
.BRID2: POP P,T3
POP P,T2
POP P,T1
RET ; AND RETURN
; HERE TO RESET THE CIRCUIT
.BRRES:
PUSH P,T1
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RPSBLK ; STORE IT
SETZM RPSBLK+1 ; ZERO THE STATUS RETURN WORD
SETZM RPSBLK+2 ; ZERO THE ERROR CONDITION,,PORT STATE
SETZM RPSBLK+3 ; ZERO THE INTERRUPT/BIT MASK
MOVEI T1,RPSBLK ; POINT TO THE ARG BLOCK
CALL X%RPS## ; AND READ THE PORT STATUS
HRRZ T1,RPSBLK+1 ; GET THE RETURN CODE
CAIE T1,XC%SUC ; SUCCESSFUL?
JRST .BRRE1 ; NO, JUST DISMISS
HRRZ T1,RPSBLK+2 ; YES, GET THE PORT STATE
CAIE T1,XS%RUN ; IS THE PORT RUNNING?
JRST .BRRE1 ; NO, JUST DISMISS
HRRZ T1,PORTNO ; YES, GET THE PORT NUMBER
MOVEM T1,RVCBLK ; STORE IT
SETZM RVCBLK+1 ; CLEAR THE RETURN CODE
SETZM RVCBLK+2 ; CLEAR THE DIAGNOSTIC BYTE
MOVEI T1,RVCBLK ; POINT AT THE ARG BLICK
CALL X%RVC## ; AND RESET THE CIRCUIT
HRRZ T1,RVCBLK+1 ; GET THE RETURN CODE
CAIN T1,XC%SUC ; SUCCESSFUL?
JRST .BRRE1 ; YES
MOVEM T1,LASTNE ; NO, STORE THE ERROR
CALL NETERR ; REPORT IT
.BRRE1: POP P,T1
RET
SUBTTL CALL COMMAND
; HERE TO PROCESS A CALL COMMAND AND CONNECT TO A REMOTE HOST
.CALL:
SETZM RCVCHR ; CLEAR RECEIVE CHARACTER COUNT
SETZM RCVPKT ; CLEAR RECEIVE PACKET COUNT
SETZM XMTCHR ; CLEAR TRANSMIT CHARACTER COUNT
SETZM XMTPKT ; CLEAR TRANSMIT CHARACTER COUNT
HLRZ P1,DTETAB ; GET THE NUMBER OF DEFINED HOSTS
JUMPE P1,.CALLA ; IF NOTHING USE ALTERNATE PROMPTING
MOVEI T2,[FLDDB. .CMKEY,,DTETAB,<>,,CONFLD]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; GET THE ADDRESS OF THE FLD USED
CAIE T3,CONFLD ; PARSE A LOGICAL NAME?
JRST PARLOG ; YES, GET THE DTE ADDR STRING
JRST PARSTR ; NO, PARSE THE STRING
.CALLA: MOVEI T2,CONFLD ; HERE IF THERE ARE NO DEFINED HOSTS
COMND
ERCAL FATAL
JRST PARSTR ; GO PARSE THE STRING
CONFLD: FLDDB. .CMFLD,CM%SDH,,<a remote DTE address>
; HERE TO TRANSLATE A LOGICAL HOST NAME TO A DTE ADDRESS STRING
PARLOG:
HLRZ P1,(T2) ; POINT TO THE DTEDAT BLOCK
CONFIRM
ADDI P1,4 ; POINT TO THE DTE ADDRESS FOR THIS HOST
HRLZ T1,P1 ; PUT SOURCE IN LH OF P1
HRRI T1,DTEADR ; PUT DESTINATION IN RH OF P1
BLT T1,DTEADR+3 ; AND MOVE THE DTE ADDRESS
ADDI P1,4 ; POINT TO THE DTE SUBADDRESS
HRLZ T1,P1 ; PUT SOURCE IN LH OF P1
HRRI T1,DTESUB ; PUT DESTINATION IN RH OF P1
BLT T1,DTESUB+3 ; AND MOVE THE DTE ADDRESS
JRST .CALL0 ; AND GO PLACE CALL
; HERE TO PARSE A DTE ADDRESS STRING
PARSTR:
MOVE P1,[POINT 7,ATMBUF,6] ; POINT TO THE FIRST CHARACTER
MOVE P2,[POINT 7,DTEADR,6] ; POINT TO THE DESTINATION
SETZ P3, ; ZERO A CHARACTER COUNTER
LDB P4,P1 ; GET A CHARACTER
PARST1: CAIE P4,040 ; A SPACE?
JRST PARST2 ; NO, GO ON
ILDB P4,P1 ; GET ANOTHER CHARACTER
JRST PARST1 ; AND CHECK FOR ANOTHER LEADING SPACE
PARST2: CAIN P4,0 ; A NUL?
JRST PARSTE ; YES, COMPLAIN
CAIG P4,"9" ; SKIP IF GREATER THAN THE CHAR "9"
CAIGE P4,"0" ; SKIP IF LESS THAN THE CHAR "0"
JRST PARERR ; COMPLAIN ABOUT NON-NUMERIC CHARACTER
DPB P4,P2 ; STORE IT
AOS P3 ; COUNT IT
PARST3: ILDB P4,P1 ; GET A CHARACTER
CAIN P4,0 ; A NUL?
JRST PAREOS ; YES, END OF STRING
CAIG P4,"9" ; SKIP IF GREATER THAN THE CHAR "9"
CAIGE P4,"0" ; SKIP IF LESS THAN THE CHAR "0"
JRST PARERR ; COMPLAIN ABOUT NON-NUMERIC CHARACTER
IDPB P4,P2 ; DEPOSIT IT
AOS P3 ; COUNT IT
CAIG P3,^D15 ; MORE THAN ^D15 CHARACTERS?
JRST PARST3 ; NO, MOVE ANOTHER CHARACTER
HRROI T1,[ASCIZ\?Address string cannot exceed 15 characters\]
CALL .SOUTR
RET
PARERR: HRROI T1,[ASCIZ\?Address string must be numeric\]
CALL .SOUTR
RET
PAREOS: IDPB P4,P2 ; FINISH UP THE DTE ADDRESS STRING
MOVEI T2,[FLDDB. .CMFLD,CM%SDH,,<a remote DTE sub-address>,,GENRIC]
COMND
ERCAL FATAL
SETZM DTESUB ; <CR> SO ZERO THE SUB-ADDRESS STRING
HRRZ T3,T3 ; GET THE FLD USED TO PARSE
CAIE T3,GENRIC ; WHICH FLD WAS USED TO PARSE?
JRST PRSSTR ; GO PARSE THE SUB-ADDRESS STRING
SKIPE LOGJFN
CALL LOG
JRST .CALL0 ; AND GO PLACE THE CALL
; HERE ON AN INVALID (OR NULL) STRING
PARSTE: HRROI T1,[ASCIZ\?Illegal null string specified\]
CALL .SOUTR
RET
; HERE TO PARSE THE DTE SUB-ADDRESS STRING
PRSSTR:
MOVE P1,[POINT 7,ATMBUF,6] ; POINT TO THE FIRST CHARACTER
MOVE P2,[POINT 7,DTESUB,6] ; POINT TO THE DESTINATION
SETZ P3, ; ZERO A CHARACTER COUNTER
LDB P4,P1 ; GET A CHARACTER
PRSST1: CAIE P4,040 ; A SPACE?
JRST PRSST2 ; NO, GO ON
ILDB P4,P1 ; GET ANOTHER CHARACTER
JRST PRSST1 ; AND CHECK FOR ANOTHER LEADING SPACE
PRSST2: CAIN P4,0 ; A NUL?
JRST PRSEOS ; YES, NO SUBADDRESS STRING GIVEN
CAIG P4,"9" ; SKIP IF GREATER THAN THE CHAR "9"
CAIGE P4,"0" ; SKIP IF LESS THAN THE CHAR "0"
JRST PRSERR ; COMPLAIN ABOUT NON-NUMERIC CHARACTER
DPB P4,P2 ; STORE IT
AOS P3 ; COUNT IT
PRSST3: ILDB P4,P1 ; GET A CHARACTER
CAIN P4,0 ; A NUL?
JRST PRSEOS ; YES, END OF STRING
CAIG P4,"9" ; SKIP IF GREATER THAN THE CHAR "9"
CAIGE P4,"0" ; SKIP IF LESS THAN THE CHAR "0"
JRST PRSERR ; COMPLAIN ABOUT NON-NUMERIC CHARACTER
IDPB P4,P2 ; DEPOSIT IT
AOS P3 ; COUNT IT
CAIG P3,^D15 ; MORE THAN ^D15 CHARACTERS?
JRST PRSST3 ; NO, MOVE ANOTHER CHARACTER
HRROI T1,[ASCIZ\?Sub-address string cannot exceed 15 characters\]
CALL .SOUTR
RET
PRSERR: HRROI T1,[ASCIZ\?Subaddress string must be numeric\]
CALL .SOUTR
RET
PRSEOS: IDPB P4,P2 ; FINISH OFF STRING
CONFIRM
.CALL0: SKIPN CALLCT ; IS THERE AN OUTSTANDING CALL?
JRST .CALL1 ; NO, GO PLACE THE CALL
HRROI T1,[ASCIZ\?A connection to a Remote DTE already exists\]
CALL .SOUTR
RET
; HERE TO PLACE THE CALL
.CALL1:
SETOM CALLCT ; SET THE INTERLOCK
MOVE P1,[CH.NET,,PRTBLK] ; FIRST THING IS TO SET UP ISCBLK
MOVEM P1,ISCBLK+0 ; SET PSI CHANNEL,,POINTER TO PORT BLOCK
SETZM ISCBLK+1 ; CLEAR RETURN CODE WORD
MOVE P1,NETNAM ; GET THE NETWORK NAME
JUMPN P1,.CALL2 ; WAS A NETWORK ALREADY SPECIFIED?
; GET NETWORK NAME HERE (IF NECESSARY)
PUSH P,CMDBLK ; SAVE COMMAND BLOCK REPARSE
MOVEI T1,NAMPRS ; FLAGS,,ADDRESS OF REPARSE ROUTINE
MOVEM T1,CMDBLK ; UPDATE COMAND BLOCK
PUSH P,CMDBLK+2 ; SAVE CTRL/R BUFFER
HRROI T1,[ASCIZ\Network Name: \] ; CONTROL-R BUFFER
MOVEM T1,CMDBLK+2 ; NEW CTRL/R BUFFER
CALL NAMPRS ; WE MUST RETURN TO HERE TO RESTORE
POP P,CMDBLK+2 ; RESTORE CTRL/R BUFFER
POP P,CMDBLK ; RESTORE REPARSE ADDRESS
RET
NAMPRS: MOVEI T1,CMDBLK ; POINT TO COMMAND BLOCK
MOVEI T2,[FLDDB. .CMINI] ; INIT STATE BLOCK
COMND
ERCAL FATAL
MOVEI T2,[FLDDB. .CMFLD,CM%SDH,,<network you wish to access (maximum of 16 characters)>]
COMND
ERCAL FATAL
MOVE P1,[POINT 7,ATMBUF,6] ; POINT TO THE FIRST CHARACTER
MOVE P2,[POINT 7,NETNAM,6] ; POINT TO THE DESTINATION
SETZ P3, ; ZERO A CHARACTER COUNTER
LDB P4,P1 ; GET A CHARACTER
NAMPR1: CAIE P4,040 ; A SPACE?
JRST NAMPR2 ; NO, GO ON
ILDB P4,P1 ; GET ANOTHER CHARACTER
JRST NAMPR1 ; AND CHECK FOR ANOTHER LEADING SPACE
NAMPR2: DPB P4,P2 ; STORE IT
AOS P3 ; COUNT IT
NAMPR3: ILDB P4,P1 ; GET A CHARACTER
CAIN P4,0 ; A NUL?
JRST NAMEOS ; YES, END OF STRING
IDPB P4,P2 ; DEPOSIT IT
AOS P3 ; COUNT IT
CAIG P3,^D16 ; MORE THAN ^D16 CHARACTERS?
JRST NAMPR3 ; NO, MOVE ANOTHER CHARACTER
HRROI T1,[ASCIZ\?Network name cannot exceed 16 characters\]
CALL .SOUTR
JRST NAMPRS ; TRY AGAIN
NAMEOS: IDPB P4,P2 ; FINISH OFF STRING
CONFIRM
POP P,CMDBLK ; CLEAR RETURN, SUCCESS
POP P,CMDBLK+2 ; RESTORE CTRL/R BUFFER
POP P,CMDBLK ; RESTORE REPARSE ADDRESS
JRST .CALL2 ; CONTINUE
.CALL2:
MOVE P1,[POINT 7,NETNAM] ; GET A POINTER TO THE NETWORK NAME
MOVEM P1,ISCBLK+2 ; AND STORE IT
MOVE P1,[POINT 7,NETPSW] ; POINT AT NETWORK PASSWORD
ILDB P1,P1 ; GET THE FIRST CHARACTER
JUMPN P1,.CALL3 ; WAS A PASSWORD ALREADY SPECIFIED?
PUSH P,CMDBLK ; SAVE COMMAND BLOCK REPARSE
MOVEI T1,PSWRPR ; FLAGS,,ADDRESS OF REPARSE ROUTINE
MOVEM T1,CMDBLK ; UPDATE COMAND BLOCK
PUSH P,CMDBLK+2 ; SAVE CTRL/R BUFFER
HRROI T1,[ASCIZ\Network Password: \] ; CONTROL-R BUFFER
MOVEM T1,CMDBLK+2 ; NEW CTRL/R BUFFER
MOVX T1,.CTTRM ; POINT TO OUT TTY:
RFMOD
ERCAL FATAL
TXZ T2,TT%ECO ; TURN OFF ECHO
SFMOD
ERCAL FATAL
PSWPRS: MOVEI T1,CMDBLK ; POINT TO COMMAND BLOCK
MOVEI T2,[FLDDB. .CMINI] ; INIT STATE BLOCK
COMND
ERCAL FATAL
PSWRPR: MOVEI T2,[FLDDB. .CMTXT,CM%SDH,,<network access password (maximum of 16 characters)>,,GENRIC]
COMND
ERCAL FATAL
HRRZ T3,T3 ; GET WHO PARSED
CAIN T3,GENRIC ; CONFIRM?
JRST PSWPR5 ; YES
MOVE P1,[POINT 7,ATMBUF,6] ; POINT TO THE FIRST CHARACTER
MOVE P2,[POINT 7,NETPSW,6] ; POINT TO THE DESTINATION
SETZ P3, ; ZERO A CHARACTER COUNTER
LDB P4,P1 ; GET A CHARACTER
PSWPR1: CAIE P4,040 ; A SPACE?
JRST PSWPR2 ; NO, GO ON
ILDB P4,P1 ; GET ANOTHER CHARACTER
JRST PSWPR1 ; AND CHECK FOR ANOTHER LEADING SPACE
PSWPR2: DPB P4,P2 ; STORE IT
AOS P3 ; COUNT IT
PSWPR3: ILDB P4,P1 ; GET A CHARACTER
CAIN P4,0 ; A NUL?
JRST PSWEOS ; YES, END OF STRING
IDPB P4,P2 ; DEPOSIT IT
AOS P3 ; COUNT IT
CAIG P3,^D16 ; MORE THAN ^D16 CHARACTERS?
JRST PSWPR3 ; NO, MOVE ANOTHER CHARACTER
HRROI T1,[ASCIZ\?Network password cannot exceed 16 characters\]
CALL .SOUTR
JRST PSWPRS ; TRY AGAIN
PSWPR5: SETZM NETPSW ; ZERO THE PASSWORD
JRST PSWEOX
PSWEOS: IDPB P4,P2 ; FINISH OFF STRING
CONFIRM
PSWEOX: MOVX T1,.CTTRM ; POINT TO OUT TTY:
RFMOD
ERCAL FATAL
TXO T2,TT%ECO ; TURN ON ECHO
SFMOD
ERCAL FATAL
CALL OCRLF
POP P,CMDBLK+2 ; RESTORE CTRL/R BUFFER
POP P,CMDBLK ; RESTORE REPARSE ADDRESS
JRST .CALL3 ; CONTINUE
.CALL3:
MOVE P1,[POINT 7,NETPSW] ; GET A POINTER TO THE PASSWORD
MOVEM P1,ISCBLK+3 ; AND STORE IT
MOVE P1,[POINT 7,DTEADR] ; POINT AT ADDRESS STRING
MOVE P2,[POINT 7,DTESTR] ; POINT AT ADDRESS BUFFER
.CAL3A: ILDB T1,P1 ; GET A BYTE
JUMPE T1,.CAL3B ; END OF STRING?
IDPB T1,P2 ; NO, STORE BYTE
JRST .CAL3A ; BACK FOR MORE
.CAL3B: MOVE P1,[POINT 7,DTESUB] ; POINT AT SUBADDRESS STRING
.CAL3C: ILDB T1,P1 ; GET A BYTE
JUMPE T1,.CAL3D ; END OF STRING
IDPB T1,P2 ; NO, STORE BYTE
JRST .CAL3C ; BACK FOR MORE
.CAL3D: IDPB T1,P2 ; FINISH STRING WITH A ZERO BYTE
MOVE P1,[POINT 7,DTESTR] ; GET A POINTER TO THE DTE ADDRESS
MOVEM P1,ISCBLK+4 ; AND STORE IT
SETZM ISCBLK+5 ; NO SOURCE DTE SUBADDRESS
SETZM ISCBLK+6 ; NO CLOSED USER GROUP
SETZM ISCBLK+7 ; NO FACILITIES DATA
HRLZI P1,USRDSZ ; SIZE OF USER DATA
HRRI P1,USRDAT ; ADDR OF USER DATA
MOVEM P1,ISCBLK+10 ; AND STORE IT
.CALL4:
HRROI T1,[ASCIZ\ BREAK-CHARACTER (is) \]
CALL .SOUT
MOVE T2,BRKCHR ; GET BREAK CHARACTER
CAIG T2,177 ;
CAIGE T2,1 ; BETWEEN 1 AND 177?
JRST .CAL4C ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST .CAL4A ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST .CAL4D
.CAL4A: CAILE T2,37 ; A CONTROL CHARACTER?
JRST .CAL4B ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
.CAL4B: CALL .BOUT
JRST .CAL4D
.CAL4C: HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
.CAL4D: CALL OCRLF ; FINISH LINE
HRROI T1,[ASCIZ\ ESCAPE-CHARACTER (is) \]
CALL .SOUT
MOVE T2,ESCCHR ; GET ESCAPE CHARACTER
CAIG T2,177 ;
CAIGE T2,1 ; BETWEEN 1 AND 177?
JRST .CAL4G ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST .CAL4E ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST .CAL4H
.CAL4E: CAILE T2,37 ; A CONTROL CHARACTER?
JRST .CAL4F ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
.CAL4F: CALL .BOUT
JRST .CAL4H
.CAL4G: HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
.CAL4H: CALL .SOUTR
HRROI T1,[ASCIZ\ Calling Remote DTE \]
CALL .SOUT
HRROI T1,DTEADR
CALL .SOUT
MOVE T1,[POINT 7,DTESUB,6] ; POINT TO FIRST BYTE OF THE SUBADDRESS
LDB T1,T1 ; GET IT
JUMPE T1,.CAL4I ; NO SUBADDRESS
HRROI T1,[ASCIZ\ (\]
CALL .SOUT
HRROI T1,DTESUB ; POINT TO SUBADDRESS
CALL .SOUT
HRROI T1,[ASCIZ\)\]
CALL .SOUT
.CAL4I: MOVEI T1,ISCBLK ; LOAD POINTER TO ARGUMENT BLOCK
CALL X%ISC## ; AND INITIATE A SWITCHED CIRCUIT
HRRZ P1,ISCBLK ; GET RETURNED PORT NUMBER
MOVEM P1,PORTNO ; AND SAVE IT FOR FUTURE USE
MOVE P1,ISCBLK+1 ; GET THE RETURN CODE
CAIN P1,XC%SUC ; SUCCESS?
JRST .CALL5 ; YES CONTINUE
MOVEM P1,LASTNE ; NO, SAVE THE ERROR
HRROI T1,[ASCIZ\ [FAILED]\]
CALL .SOUTR
CALL NETERR ; CALL ERROR ROUTINE
SETZM CALLCT ; CLEAR THE CALL INTERLOCK
RET ; AND RETURN
.CALL5: MOVEI T1,^D500 ; SET UP TO WAIT 1/2 A SECOND
DISMS ; AND DISMISS
HRRZ P1,PORTNO ; GET THE PORT NUMBER
MOVEM P1,RPSBLK ; AND STORE IT
SETZM RPSBLK+1 ; ZERO THE STATUS RETURN WORD
SETZM RPSBLK+2 ; ZERO THE ERROR CONDITION,,PORT STATE
SETZM RPSBLK+3 ; ZERO THE INTERRUPT/BIT MASK
MOVEI T1,RPSBLK ; POINT TO THE ARGUMENT BLOCK
CALL X%RPS## ; AND READ THE PORT STATUS
MOVE P1,RPSBLK+1 ; GET THE RETURNED STATUS
CAIN P1,XC%SUC ; SUCCESSFUL RETURN?
JRST .CALL6 ; YES, GO ON
MOVEM P1,LASTNE ; SAVE THE ERROR CODES
HRROI T1,[ASCIZ\ [FAILED]\]
CALL .SOUTR
CALL NETERR ; AND REPORT THE ERROR
SETZM CALLCT ; CLEAR THE INTERLOCK
RET
.CALL6: HRRZ P1,RPSBLK+2 ; GET THE PORT STATE
CAIN P1,XS%CAG ; STILL CALLING?
JRST .CALL5 ; YES, WAIT SOME MORE
CAIN P1,XS%RUN ; RUNNING?
JRST .CALL8 ; YES, GO ON
CAIN P1,XS%ERR ; ERROR?
JRST .CAL7H ; YES...GO REPORT THE PROBLEM
CAIN P1,XS%CLD ; CLEARED?
JRST .CALL7 ; YES...REJECTION
.CAL6A: HRROI T1,[ASCIZ\ [FAILED]\]
CALL .SOUTR
HRROI T1,[ASCIZ\?The port entered an illegal state while waiting for call completion\]
CALL .SOUTR
HRROI T1,[ASCIZ\ Current Port State is \]
CALL .SOUT
MOVE T1,PORTST(P1) ; POINT TO PORT STATE
CALL .SOUTR
SETZM CALLCT ; CLEAR THE INTERLOCK
RET
.CALL7: HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RCDBLK ; STORE IT
SETZM RCDBLK+1 ; CLEAR THE RETURN CODE
SETZM RCDBLK+2 ; CLEAR THE CAUSE BYTES
MOVE T1,[POINT 7,CLSGRP]
MOVEM T1,RCDBLK+3 ; STORE IT
MOVE T1,[ ^D63,,FACBLK ] ; POINT TO FACILITIES BLOCK
MOVEM T1,RCDBLK+4 ; STORE IT
MOVE T1,[ ^D16,,CLDBLK ] ; POINT TO CLEAR DATA BLOCK
MOVEM T1,RCDBLK+5
MOVEI T1,RCDBLK ; POINT AT ARG BLOCK
CALL X%RCD##
HRRZ T1,RCDBLK+1 ; GET RETURN CODE
TXNN T1,<0,,-1>-XC%NDA ; SUCCESS?
JRST .CAL7A ; YES, GO ON
MOVEM T1,LASTNE ; SAVE THE ERROR CODES
HRROI T1,[ASCIZ\ [FAILED]\]
CALL .SOUTR
CALL NETERR ; AND REPORT THE ERROR
CALL NETTRM ; TERMINATE THE PORT
SETZM CALLCT ; CLEAR THE INTERLOCK
RET
.CAL7A:
HLRZ T1,RCDBLK+2 ; GET NETWORK CLEAR CODE
JUMPN T1,.CAL7B ; JUMP IF THE NETWORK DID THE CLEARING
HRROI T1,[ASCIZ\ [FAILED]\] ; HMMMM, THE REMOTE HOST DID THIS
CALL .SOUTR
HRROI T1,[ASCIZ\?The remote host has refused connection\]
CALL .SOUTR
HRROI T1,[ASCIZ\ User clear diagnostic #\]
CALL .SOUT
HRRZ T2,RCDBLK+2 ; GET THE USER DIAGNOSTIC CODE
MOVEI T3,^D10 ; PRINT IT IN DECIMAL
CALL .NOUT
CALL ERROR
CALL OCRLF
CALL .ACCNT ; LOG THE CALL
CALL NETTRM
SETZM CALLCT ; CLEAR THE INTERLOCK
RET
.CAL7B: MOVEI T2,CCAUSE ; POINT TO THE CAUSE TABLE
.CAL7C: HLRZ T3,(T2) ; GET DIAG VALUE FROM TABLE
CAMN T1,T3 ; IS THIS THE CAUSE OF THE CLEAR?
JRST .CAL7D ; YES, GO PRINT REASON
JUMPE T3,.CAL7E ; JUMP IF AT END OF TABLE
AOJA T2,.CAL7C ; INCREMENT TABLE POINTER AND TRY AGAIN
.CAL7D: HRROI T1,[ASCIZ\ [FAILED]\]
CALL .SOUTR
HRRO T1,(T2) ; BUILD POINTER TO STRING
CALL .SOUTR ; AND PRINT IT
HRROI T1,[ASCIZ\ Network clear code #\]
CALL .SOUT
HLRZ T2,RCDBLK+2 ; GET CLEAR CODE (AGAIN)
MOVEI T3,^D10 ; PRINT IT IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\, diagnostic code #\]
CALL .SOUT
HRRZ T2,RCDBLK+2 ; GET THE DIAGNOSTIC CODE
MOVEI T3,^D10 ; PRINT IT IN DECIMAL
CALL .NOUT
CALL ERROR
CALL OCRLF
JRST .CAL7F ; GO CLEAN UP
.CAL7E: HRROI T1,[ASCIZ\ [FAILED]\]
CALL .SOUTR
HRROI T1,[ASCIZ\?Call not completed - Unknown clear code #\]
CALL .SOUT
HLRZ T2,RCDBLK+2 ; GET CLEAR CODE (AGAIN)
MOVEI T3,^D10 ; PRINT IT IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\, diagnostic code #\]
CALL .SOUT
HRRZ T2,RCDBLK+2 ; GET THE DIAGNOSTIC CODE
MOVEI T3,^D10 ; PRINT IT IN DECIMAL
CALL .NOUT
CALL ERROR
CALL OCRLF
.CAL7F: CALL NETTRM
SETZM CALLCT ; CLEAR THE INTERLOCK
RET
.CAL7H:
MOVE T1,RPSBLK+2 ; GET THE ERROR BITS
TXNN T1,XE%NCM ; IS THE PPSN UP AND TALKING?
JRST .CAL6A ; HMMM, PROBABLY...JUST REPORT THE ERROR
HRROI T1,[ASCIZ\ [FAILED]\]
CALL .SOUTR
HRROI T1,[ASCIZ\?The public data network is not running\]
CALL .SOUTR
JRST .CAL7F ; NOW CLEAN-UP AND RETURN
; HERE TO ADD A RECORD TO THE ACCOUNTING LOG INDICATING DATE, TIME, USER,
; DTE ADDRESS, AND SUCCESS (OR FAILURE)
.ACCNT:
PUSH P,T1
PUSH P,T2
PUSH P,T3
PUSH P,T4
SETO T1, ; THIS JOB
HRROI T2,.TDEFS ; PLACE TO SAVE TTY #
MOVX T3,.JITNO ; WE WANT TTY #
GETJI
ERJMP ERROR ; SHOULD NEVER HAPPEN
HRROI T2,.TDEFS+1 ; PLACE TO SAVE DIR #
MOVX T3,.JILNO ; WE WANT LOGED IN DIR #
GETJI
ERJMP ERROR ; SHOULD NEVER HAPPEN
HRROI T1,.TDEFS+1 ; STORE THE STRING @.TDEFS+1
MOVE T2,.TDEFS+1 ; GET DIR #
DIRST
ERJMP ERROR ; SHOULD NEVER HAPPEN
MOVE T2,[440700,,.TDEFS+1] ; STRING POINT TO DIRECTORY
MOVE T2 ; COPY IT TO ZERO
.ACCN1: ILDB T3,T2 ; GET BYTE
CAIE T3,"<" ; IS IT A <
JUMPN T3,.ACCN1 ; NO, TRY NEXT
SKIPE T3
.ACCN2: ILDB T3,T2 ; GET NEXT BYTE
IDPB T3, ; SAVE THIS BYTE
CAIE T3,">" ; IS IT A >
JUMPN T3,.ACCN2
SETZ T3,
DPB T3, ; TERMINATE STRING HERE
MOVX T1,GJ%SHT ; SHORT FORM
HRROI T2,[ASCIZ\PS:<SYSTEM>X29PAD-ACCOUNTING.ACT\] ; PNTR TO FILE NAME
GTJFN
JRST .ACCN5 ; IF NO FILE EXISTS NO LOGGING IS DONE
PUSH P,T1 ; SAVE JFN ON STACK
.ACCN3: MOVE T1,(P) ; GET JFN
MOVE T2,[FLD(7,OF%BSZ)!OF%APP] ; OPENF FLAGS
OPENF
JRST .ACCN3 ; LOOP UNTIL FILE IS AVAILIBLE
SETO T2, ; CURRENT DATE AND TIME
SETZ T3,
ODTIM
MOVEI T2," " ; SPACE
BOUT
MOVE T2,[440700,,.TDEFS+1] ; STRING POINT TO DIRECTORY
SOUT
HRROI T2,[ASCIZ\ (on) \]
SOUT
HRROI T2,[ASCIZ\TTY\]
SKIPGE .TDEFS ; IS JOB DTACHED?
HRROI T2,[ASCIZ\DET\] ; YES
SOUT
MOVE T2,.TDEFS ; GET TTY #
MOVEI T3,10 ; OUTPUT OCTAL
SKIPL T2 ; DONT OUTPUT NEGATIVE NUMBER
NOUT
SKIP ; IGNORE ERROR RETURN
HRROI T2,[ASCIZ\ CALLED DTE \]
SOUT
MOVE T1,(P) ; OUTPUT JFN
HRROI T2,DTEADR ; ADRESS OF DTE
SETZ T3,
SOUT
LDB [POINT 7,DTESUB,6] ; GET SUB ADRESS
JUMPE .ACCN4 ; JUMP AROUND IF ALL DONE
HRROI T2,[ASCIZ\ (\]
SOUT
HRROI T2,DTESUB ; POINT TO SUB STRING
SOUT
MOVEI T2,")"
BOUT
.ACCN4: HRROI T2,CRLF ; POINT TO CRLF
SOUT
POP P,T1 ; GET THE OUTPUT JFN
CLOSF
ERJMP ERROR ; SHOULD NEVER HAPPEN
.ACCN5: POP P,T4
POP P,T3
POP P,T2
POP P,T1
RET ; AND RETURN
; IF WE GOT HERE THEN THE SWITCHED CIRCUIT IS RUNNING
.CALL8: HRROI T1,[ASCIZ\ [OK]\] ; TELL THE USER THE CALL WENT THROUGH
CALL .SOUTR
CALL .ACCNT ; LOG THE CALL
SETOM RADFLG ; NOTE THAT WE HAVE TO CALL X%RAD
MOVE T1,INIPTR ; GET THE INITIAL TTY INPUT POINTER
MOVEM T1,TTIPTR ; AND STORE IT
SETZM TTICNT ; ZERO THE TTIBUF CHAR COUNT
MOVEI T1,.CTTRM ; POINT TO THE CONTROLING TERMINAL
RFCOC ; READ CCOC WORDS
MOVEM T2,OCCOC ; SAVE AWAY THE ORIGINAL WORD #1
MOVEM T3,OCCOC+1 ; AND ORIGINAL WORD #2
MOVE T2,[525252,,525252] ; MAKE UP NEW CCOC WORDS TO MAKE ALL
MOVE T3,T2 ; CONTROL CHARACTERS GIVE THEIR CODE
SFCOC
MOVEI T1,.PRIIN ; READ MODE WORD
RFMOD
MOVEM T2,OMODE ; SAVE AWAY THE ORIGINAL MODE WORD
TDZ T2,[37777,,4020] ; ZERO PAGE LENGTH, WIDTH; NO ECHO
TDO T2,[200000,,300] ; TURN ON FORMF, NO-TRANS-OUTP BITS
SFMOD
STPAR
MOVEI T1,-5 ; ENABLE TTY INTERUPTS FOR JOB
RTIW ; READ THE TERMINAL INTERRUPT WORD
ERCAL FATAL
MOVEM T2,OTIW ; AND SAVE IT
MOVX T2,1B<.TICTI> ; AND NOW SET IT FOR TYPE IN
STIW
ERCAL FATAL ; SHOULD NEVER HAPPEN
; HERE TO (RE)START COMMUNICATIONS ON THE CIRCUIT TO THE REMOTE-HOST
.CAL8A: MOVE T1,[.TICTI,,CH.TTY] ; ACTIVATE TTY's CHANNEL
ATI
ERCAL FATAL ; SHOULD NEVER HAPPEN
MOVX T1,.FHSLF ; CAUSE A INTERUPT
MOVX T2,CH%TTY ; ON TTY's CHANNEL
AIC
ERCAL FATAL
IIC ; CAUSE AN INTERRUPT
MOVX T2,CH%TMR ; ACTIVATE TIMER's CHANNEL
AIC
ERCAL FATAL ; SHOULD NEVER HAPPEN
IIC ; CAUSE A INTERUPT
MOVX T2,CH%NET ; ACTIVATE NET's CHANNEL
AIC
ERCAL FATAL ; SHOULD NEVER HAPPEN
IIC ; CAUSE A INTERUPT
HRLZI T1,400 ; DISMIS FOR MAXIMUM
DISMS
JRST .-2 ; GOOD RUN TIME FOR THIS SYSTEM
.CALL9: ; HERE WHEN CONTROL IT RETURNED TO US
MOVEI T1,-5 ; NOW PUT THE TERMINAL BACK TO ITS
MOVE T2,OTIW ; ORIGINAL STATE
STIW ; SET THE INTERRUPT WORD
ERCAL FATAL
MOVEI T1,.CTTRM ; POINT AT CONTROLLING TERMINAL
MOVE T2,OCCOC ; GET ORIGINAL CCOC WORD #1
MOVE T3,OCCOC+1 ; GET ORIGINAL CCOC WORD #2
SFCOC ; AND SET THEM
ERCAL FATAL
MOVEI T1,.PRIIN ;
MOVE T2,OMODE ; GET THE ORIGINAL MODE WORD
SFMOD
ERCAL FATAL
STPAR
ERCAL FATAL
RET ; NOW RETURN TO PARSE MORE COMMANDS
; HERE TO HANDLE NETWORK INTERRUPTS
$NETIN:
MOVEM P,NETACS+17 ; LETS SAVE THE ACS
MOVEI P,NETACS ; OF WHATEVER PROCESS WE INTERRUPTED
BLT P,NETACS+16 ;
MOVE P,[IOWD NTPLEN,NETPDL] ; USE OUR OWN STACK
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RPSBLK ; AND STORE IT
SETZM RPSBLK+1 ; ZERO STATUS RETURN WORD
SETZM RPSBLK+2 ; ZERO ERROR CONDITION,,PORT STATE
SETZM RPSBLK+3 ; ZERO THE INTERRUPT/BIT MASK
MOVEI T1,RPSBLK ; POINT TO THE ARG BLOCK
CALL X%RPS## ; AND READ THE PORT STATUS
MOVE T1,RPSBLK+1 ; GET THE RETURN CODE
CAIN T1,XC%SUC ; SUCCESSFUL RETURN?
JRST $NETI1 ; YES, GO ON
$NETI0: MOVEM T1,LASTNE ; SAVE THE ERROR CODES
CALL NETERR ; AND REPORT THE ERROR
MOVX T1,.FHSLF ; NO, ERROR...POINT AT OURSELF
MOVX T2,CH%TTY ; POINT AT THE TTY CHANNEL
DIC ; AND DISABLE HIM
ERCAL FATAL
MOVX T2,CH%TMR ; NOW THE TIMER CHANNEL
DIC
ERCAL FATAL
MOVX T2,CH%NET ; AND THE NETWORK CHANNEL
DIC
ERCAL FATAL
HRROI T1,[ASCIZ\?Aborting the call and clearing the circuit\]
CALL .SOUTR
CALL NETTRM ; TERMINATE PORT ACCESS
MOVEI T1,.CALL9 ; GET RETURN ADDRESS
MOVEM T1,@LEVTAB+LV.NET-1 ; STORE IT FOR DEBRK TO FIND
JRST $NETI3 ; AND DISMISS
$NETI1: HRRZ T1,RPSBLK+2 ; GET THE STATE OF THE PORT
CAIN T1,XS%RUN ; STILL RUNNING?
JRST $NETI2 ; YES, CONTINUE
CAIN T1,XS%SYN ; SYNCHING?
JRST $NETI3 ; YES, JUST DISMISS FOR NOW...
CAIN T1,XS%UNS ; UNSYNCH? (HAS THE NET BEEN RESET?)
JRST $NRES ; YES, GO ISSUE A RESET AND DISMISS
MOVX T1,.FHSLF ; NO, ERROR...POINT AT OURSELF
MOVX T2,CH%TTY ; POINT AT THE TTY CHANNEL
DIC ; AND DISABLE HIM
ERCAL FATAL
MOVX T2,CH%TMR ; NOW THE TIMER CHANNEL
DIC
ERCAL FATAL
MOVX T2,CH%NET ; AND THE NETWORK CHANNEL
DIC
ERCAL FATAL
HRROI T1,[ASCIZ\?The PORT is not RUNNING! The current PORT state is \]
CALL .SOUT
HRRZ T1,RPSBLK+2 ; GET THE PORT STATE
MOVE T1,PORTST(T1) ; GET THE POINTER TO THE STRING
CALL .SOUTR
HRROI T1,[ASCIZ\?Aborting and clearing the circuit!\]
CALL .SOUTR
CALL NETTRM ; TERMINATE PORT ACCESS
MOVEI T1,.CALL9 ; GET RETURN ADDRESS
MOVEM T1,@LEVTAB+LV.NET-1 ; STORE IT FOR DEBRK TO FIND
JRST $NETI3 ; AND DISMISS
$NETI2: MOVE T1,RPSBLK+3 ; GET PORT BITS
TXNE T1,XM%IIC ; INCOMING INTERRUPT CONFIRM?
CALL $NIIC ; YES, PROCESS IT
TXNE T1,XM%OIC ; OUTGOING INTERRUPT CONFIRM?
CALL $NOIC ; YES, PROCESS IT
TXNE T1,XM%DAT ; INCOMING DATA?
CALL $NDAT ; YES, PROCESS IT
TXNE T1,XM%INT ; INCOMING INTERRUPT DATA?
CALL $NINT ; YES, PROCESS IT
$NETI3: MOVSI P,NETACS ; RESTORE ALL OF THE ACS
BLT P,P
DEBRK
ERCAL FATAL
IICCNT: BLOCK 1
OICCNT: BLOCK 1
DATCNT: BLOCK 1
INTCNT: BLOCK 1
; HERE TO ACKNOWLEDGE A NETWORK RESET
$NRES:
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RVCBLK ; STORE IT
SETZM RVCBLK+1 ; CLEAR THE RETURN CODE
SETZM RVCBLK+2 ; CLEAR THE DIAG DATA BYTE
MOVEI T1,RVCBLK ; POINT TO THE ARG BLOCK
CALL X%RVC##
HRRZ T1,RVCBLK+1 ; GET THE RETURN CODE
CAIN T1,XC%SUC ; SUCCESS???
JRST $NETI3 ; YES, JUST DISMISS
JRST $NETI0 ; NO, GO ABORT THE CIRCUIT
; HERE TO PROCESS AN INCOMING INTERRUPT CONFIRM
$NIIC:
AOS IICCNT
RET
; HERE TO PROCESS AN OUTGOING INTERRUPT CONFIRM
$NOIC:
AOS OICCNT
RET
; HERE TO PROCESS INCOMING DATA
$NDAT:
PUSH P,T1
PUSH P,T2
PUSH P,T3
PUSH P,T4
MOVE T1,5 ; LOAD T1 WITH 5
MOVEM T1,NCOUNT ; AND SET THE NUMBER OF MSGS WE'LL READ
; BEFORE WE CHECK FOR TTY INTERRUPTS
$NDAT0: SKIPE RADFLG ; HAVE WE'VE DONE A CALL TO X%RAD
CALL $NRAD ; NO, GO DO ONE
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RDMBLK ; STORE IT
SETZM RDMBLK+1 ; ZERO THE STATUS RETURN WORD
MOVEI T1,RCVSIZ ; GET THE RECEIVE BUFFER SIZE
MOVEM T1,RDMBLK+2 ; STORE IT
MOVE T1,[POINT 8,RCVBUF] ; GET BYTE POINTER TO RECEIVER BUFFER
MOVEM T1,RDMBLK+3 ; STORE IT
MOVEI T1,RDMBLK ; POINT TO THE ARG BLOCK
CALL X%RDM## ; AND READ DATA MESSAGE
HRRZ T1,RDMBLK+1 ; GET RETURN STATUS
TXNN T1,<0,,-1>-XC%NDA ; SUCCESS?
JRST $NDAT1 ; YES, CONTINUE
MOVEM T1,LASTNE ; SAVE THE ERROR STATE
MOVX T1,.FHSLF ; NO, ERROR...POINT AT OURSELF
MOVX T2,CH%TTY ; POINT AT THE TTY CHANNEL
DIC ; AND DISABLE HIM
ERCAL FATAL
MOVX T2,CH%TMR ; NOW THE TIMER CHANNEL
DIC
ERCAL FATAL
MOVX T2,CH%NET ; AND THE NETWORK CHANNEL
DIC
ERCAL FATAL
CALL NETERR ; DISPLAY THE ERROR
HRROI T1,[ASCIZ\?Aborting and clearing the circuit!\]
CALL .SOUTR
CALL NETTRM ; TERMINATE PORT ACCESS
MOVEI T1,.CALL9 ; GET RETURN ADDRESS
MOVEM T1,@LEVTAB+LV.NET-1 ; STORE IT FOR DEBRK TO FIND
JRST $NETI3 ; AND DISMISS
$NDAT1: TXNE T1,XC%NDA ; ANY DATA?
JRST $NDAT6 ; NO MORE, EXIT
AOS RCVPKT ; INCREMENT THE PACKET COUNT
HRRZ T1,RDMBLK+2 ; GET THE NUMBER OF BYTES RECEIVED
JUMPE T1,$NDAT5 ; IF ZERO BYTE COUNT, GO TRY NEXT MSG
ADDM T1,RCVCHR ; AND ADD TO THE TOTAL COUNT
MOVE T2,RDMBLK+2 ; GET FLAGS,,COUNT
TXNE T2,XM%QUA ; QUALIFIED DATA?
JRST $NQDT ; YES, GO PROCESS IT
HRRZ T2,PAD.8 ; GET DISPOSITION OF OUTPUT PARAMETER
TXNE T2,P08%DO ; DISCARD OUTPUT?
JRST $NDAT5 ; YES...
MOVE T2,[POINT 8,RCVBUF] ; POINTER TO RECEIVED DATA
MOVE T3,[POINT 7,TTOBUF] ; POINTER TO TTY OUTPUT BUFFER
$NDAT2: ILDB T4,T2 ; GET A BYTE
IDPB T4,T3 ; PUT A BYTE
SOJG T1,$NDAT2 ; DECREMENT COUNT AND JUMP IF MORE DATA
SETZ T4, ; CREATE A ZERO BYTE
IDPB T4,T3 ; AND FINISH BUFFER WITH A NULL CHAR
MOVE T1,OUTJFN ; POINT TO THE OUTPUT DEVICE
MOVE T2,[POINT 7,TTOBUF] ; POINT AT OUTPUT STRING
HRRZ T3,RDMBLK+2 ; GET THE COUNT
MOVN T3,T3 ; NEGATE IT
SOUT ; AND PRINT IT
SKIPN LOGJFN ; ARE WE LOGGING
JRST $NDAT5 ; NO, GO BACK FOR ANOTHER DATA MSG
HRRZ T3,RDMBLK+2 ; GET THE COUNT
SKIPN L.SUPP ; ARE WE STRIPPING NULLS?
JRST $NDAT4 ; NO, GO PRINT IT
MOVE T1,[POINT 7,TTOBUF] ; YES, POINT TO OUTPUT STRING
MOVE T2,T1 ; COPY IT TO T2
$NDAT3: ILDB T4,T1 ; GET BYTE
SKIPE T4 ; IF NUL, SKIP
IDPB T4,T2 ; SAVE BYTE
SOJG T3,$NDAT3 ; LOOP THROUGH ALL
IDPB T3,T2 ; SAVE NULL TERMINATION BYTE
$NDAT4: MOVE T1,LOGJFN ; GET LOG JFN
MOVE T2,[POINT 7,TTOBUF] ; POINT AT OUTPUT STRING
MOVN T3,T3 ; NEGATE COUNT
CALL LSOUT ; GO OUTPUT TO LOG
JRST $NDAT5 ; NOW GO BACK FOR ANOTHER DATA MSG
; HERE TO DECIDE WHETHER TO GO BACK FOR MORE NETWORK DATA OR TO DISMISS
; AND GIVE THE TTY CHANNEL A CHANCE
$NDAT5:
SOSE NCOUNT ; DECREMENT MSG COUNT
JRST $NDAT0 ; NOT ZERO SO DON'T CHECK TTY CHANNEL
MOVEI T1,^D10 ; COUNT 10 MSGS BEFORE WE CHECK AGAIN
MOVEM T1,NCOUNT ; AND STORE THE COUNT
MOVX T1,.FHSLF ; POINT AT OURSELF
RWM ; GET PENDING INTERRUPTS
ERCAL FATAL
TXNN T1,CH%TTY ; IS THERE AN INTERRUPT PENDING ON TTY?
JRST $NDAT0 ; NO, GO BACK FOR ANOTHER DATA MSG
MOVX T1,.FHSLF ; POINT AT OURSELF
MOVX T2,CH%NET ; INDICATE THE NETWORK CHANNEL
IIC ; AND CAUSE AN INTERRUPT FOR LATER
ERCAL FATAL
$NDAT6: ; AND GO AWAY TILL NEXT INTERRUPT
POP P,T4
POP P,T3
POP P,T2
POP P,T1
RET
; HERE TO DO A READ ACCEPT DATA
$NRAD:
PUSH P,T1
PUSH P,T2
PUSH P,T3
PUSH P,T4
SETZM RADFLG ; SAY THAT WE'VE BEEN HERE ONCE
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RADBLK ; STORE IT
SETZM RADBLK+1 ; ZERO THE RETURN STATUS
MOVE T1,[POINT 7,CUSGRP] ; POINT TO CLOSED USER GROUP DATA BUFFER
MOVEM T1,RADBLK+2 ; STORE IT
MOVE T1,[^D63,,FACBLK] ; SIZE,,ADDR OF FACILITIES DATA BUFFER
MOVEM T1,RADBLK+3
MOVE T1,[^D16,,ACDBLK] ; SIZE,,ADDR OF CALL ACCEPT DATA
MOVEM T1,RADBLK+4
MOVEI T1,RADBLK ; POINT TO ARG BLOCK
CALL X%RAD## ; AND READ CALL ACCEPT DATA
HRRZ T1,RADBLK+1 ; GET THE RETURN STATUS
TXNN T1,<0,,-1>-XC%NDA ; SUCCESS?
JRST $NRAD1 ; YES, CONTINUE
MOVEM T1,LASTNE ; SAVE THE ERROR STATE
MOVX T1,.FHSLF ; NO, ERROR...POINT AT OURSELF
MOVX T2,CH%TTY ; POINT AT THE TTY CHANNEL
DIC ; AND DISABLE HIM
ERCAL FATAL
MOVX T2,CH%TMR ; NOW THE TIMER CHANNEL
DIC
ERCAL FATAL
MOVX T2,CH%NET ; AND THE NETWORK CHANNEL
DIC
ERCAL FATAL
CALL NETERR ; DISPLAY THE ERROR
HRROI T1,[ASCIZ\?Aborting and clearing the circuit!\]
CALL .SOUTR
CALL NETTRM ; TERMINATE PORT ACCESS
MOVEI T1,.CALL9 ; GET RETURN ADDRESS
MOVEM T1,@LEVTAB+LV.NET-1 ; STORE IT FOR DEBRK TO FIND
JRST $NETI3 ; AND DISMISS
$NRAD1: TXNE T1,XC%NDA ; ANY DATA?
JRST $NRAD2 ; NO, JUST RETURN
HLRZ T1,RADBLK+3 ; GET FACILITIES DATA COUNT
MOVEM T1,FACCNT ; SAVE IT
ADDM T1,RCVCHR
HLRZ T1,RADBLK+4 ; GET THE CALL ACCEPT DATA COUNT
MOVEM T1,ACDCNT ; SAVE IT
ADDM T1,RCVCHR
AOS RCVPKT
$NRAD2: POP P,T4
POP P,T3
POP P,T2
POP P,T1
RET
; HERE TO PROCESS INCOMING INTERRUPT DATA
$NINT:
AOS INTCNT
RET
; HERE TO PROCESS QUALIFIED DATA
$NQDT:
PUSH P,T1
PUSH P,T2
PUSH P,T3
PUSH P,T4
MOVE T1,[POINT 8,RCVBUF] ; POINTER TO DATA IN THE RECEIVE BUFFER
ILDB T2,T1 ; GET THE FIRST BYTE
TRZE T2,370 ; MASK OFF ALL BUT THE MESSAGE TYPE
JFCL ; IGNORE ANY EXTRANIOUS BITS
AOS PADFCT(T2) ; INCREMENT TYPE FOR TRACE PURPOSES
CALL @PADFCN(T2) ; AND GO PROCESS THE MESSAGE
POP P,T4
POP P,T3
POP P,T2
POP P,T1
JRST $NDAT5
PADFCN: EXP PADPIM ; PARAMETER INDICATION
EXP PADICM ; INVITATION TO CLEAR
EXP PADSPM ; SET PARAMETERS
EXP PADIBM ; INDICATION OF BREAK
EXP PADRPM ; READ PARAMETERS
EXP PADERM ; ERROR MESSAGE
EXP PADSRM ; SET AND READ PARAMETERS
EXP PADILL ; UNDEFINED MESSAGE TYPE
PADFCT: BLOCK ^D8
; HERE TO PROCESS A PARAMETER INDICATION MESSAGE
PADPIM:
RET
; HERE TO PROCESS AN INVITATION TO CLEAR MESSAGE
PADICM:
MOVX T1,.FHSLF ; POINT AT OURSELF
MOVX T2,CH%TTY ; POINT AT THE TTY CHANNEL
DIC ; AND DISABLE HIM
ERCAL FATAL
MOVX T2,CH%TMR ; NOW THE TIMER CHANNEL
DIC
ERCAL FATAL
MOVX T2,CH%NET ; AND THE NETWORK CHANNEL
DIC
ERCAL FATAL
MOVE T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,CSCBLK ; STORE IT
SETZM CSCBLK+1 ; ZERO THE RETURN STATUS
SETZM CSCBLK+2 ;
SETZM CSCBLK+3 ;
SETZM CSCBLK+4
SETZM CSCBLK+5 ;
MOVEI T1,CSCBLK ; POINT TO THE ARG BLOCK
CALL X%CSC## ; AND TRY TO CLEAR THE SWITCHED CIRCUIT
HRRZ T1,CSCBLK ; GET THE RETURN STATUS
CAIN T1,XC%SUC ; SUCCESSFUL?
JRST PADIC1 ; YES, CONTINUE
CALL NETERR
PADIC1:
HRROI T1,[ASCIZ\
%Circuit cleared at the request of the REMOTE-HOST
\]
CALL .SOUT
CALL NETTRM ; TERMINATE PORT ACCESS
MOVEI T1,.CALL9 ; POINT TO MAIN COMMAND LOOP
MOVEM T1,@LEVTAB+LV.NET-1 ; STORE IT IN THE PC WORD WE WILL USE
MOVSI P,NETACS
BLT P,P
DEBRK ; ON THIS DEBRK
ERCAL FATAL
; HERE TO PROCESS A SET PARAMETERS MESSAGE
; NEED TO ADD CODE TO DO RIGOROUS VALUE CHECKING SOMEDAY
PADSPM:
HRRZ T2,RDMBLK+2 ; GET THE NUMBER OF BYTES IN THE MSG
SOS T2 ; DON'T COUNT THE MSG TYPE BYTE
PADSP1: ILDB T3,T1 ; GET A PAD-PARAMETER NUMBER
ILDB T4,T1 ; GET THE VALUE
JUMPE T3,PADSP3 ; IF ZERO, AT END OF X.3 PARAMETERS
CAIG T3,PADLEN ; GREATER THAN HIGHEST PAD #
CAIG T3,0 ; NO, NEGITIVE?
JRST PADSP2 ; YES, OUT OF RANGE
TXO T4,PF%WRT!PF%SET ; INDICATE THAT REMOTE SET THIS PARAM
MOVEM T4,PADBLK(T3) ; AND STORE THE VALUE
PADSP2: SOS T2 ; COUNT DOWN PARAM NUMBER BYTE
SOJG T2,PADSP1 ; AND VALUE BYTE, CONTINUE IF MORE DATA
PADSP3: RET ; NOW THAT WE ARE DONE, GO BACK FOR
; ANOTHER DATA MSG (IF THERE IS ONE)
; HERE TO PROCESS AN INDICATION OF BREAK MESSAGE
PADIBM:
RET
; HERE TO PROCESS A READ PARAMETERS MESSAGE
PADRPM:
PUSH P,P1
SETZ T3, ; SET BYTE COUNT TO ZERO
MOVE T1,[POINT 8,NTOBUF] ; GET POINTER TO OUTPUT BUFFER
MOVEI T2,0 ; ZERO T2
IDPB T2,T1 ; STORE MESSAGE TYPE (INDICATION OF PAD)
AOS T3 ; COUNT THE BYTE
SETZ P1, ; ZERO THE PAD PARAMETER NUMBER/INDEX
PADRP1: AOS P1 ; INCREMENT THE NUMBER/INDEX
IDPB P1,T1 ; STORE THE PARAMETER NUMBER
AOS T3 ; COUNT IT
HRRZ T2,PADBLK(P1) ; GET THE PARAMETER VALUE
IDPB T2,T1 ; STORE IT
AOS T3 ; COUNT IT
CAIGE P1,PADLEN ; IS THIS THE LAST X.3 PARAMETER?
JRST PADRP1 ; NO, CONTINUE BUILDING THE MESSAGE
HRRZ T1,PORTNO ; YES, GET THE PORT NUMBER
MOVEM T1,SDMBLK ; STORE IT
SETZM SDMBLK+1 ; ZERO THE RETURN CODE
TXO T3,XM%QUA ; TURN ON THE QUALIFIED DATA BIT
MOVEM T3,SDMBLK+2 ; STORE COUNT AND BITS
MOVE T1,[POINT 8,NTOBUF] ; GET A POINTER TO THE MESSAGE
MOVEM T1,SDMBLK+3 ; STORE IT
MOVEI T1,SDMBLK ; POINT TO ARG BLOCK
CALL X%SDM## ; AND SEND THE MESSAGE
HRRZ T1,SDMBLK+1 ; GET THE RETURNED STATUS
CAIN T1,XC%SUC ; SUCCESS?
JRST PADRP2 ; YES, GO ON
MOVEM T1,LASTNE ; NO, STORE THE RETURN CODE
CALL NETERR ; REPORT IT
PADRP2: POP P,P1 ; RESTORE P1
RET ; AND RETURN
; HERE TO PROCESS AN ERROR MESSAGE
PADERM:
RET
; HERE TO PROCESS A SET AND READ PARAMETERS MESSAGE
; T1 HAS BYTE POINTER TO RECEIVED MESSAGE
PADSRM:
PUSH P,P1
PUSH P,P2
PUSH P,P3
PUSH P,P4
HRRZ T2,RDMBLK+2 ; GET THE NUMBER OF BYTES IN MSG
SOS T2 ; ACCOUNT FOR THE MESSAGE TYPE
MOVE P1,[POINT 8,NTOBUF] ; POINT TO THE OUTPUT BUFFER
SETZ P2, ; ZERO OUTPUT MESSAGE BYTE COUNT
IDPB P2,P1 ; SET PARAMETER INDICATION MSG TYPE
AOS P2 ; COUNT THE BYTE
PADSR1: ILDB T3,T1 ; GET THE PARAMETER NUMBER
ILDB T4,T1 ; GET THE VALUE
JUMPE T3,PADSR3 ; IF ZERO, END OF X.3 PARAMETERS
CAIG T3,PADLEN ; GREATER THAN THE HIGHEST PAD #
CAIG T3,0 ; NO, NEGITIVE?
JRST PADSR2 ; YES, OUT OF RANGE
TXO T4,PF%WRT!PF%SET ; INDICATE THAT REMOTE SET THIS PARAM
MOVEM T4,PADBLK(T3) ; AND STORE IT
PADSR2: IDPB T3,P1 ; STORE THE PARAM IN THE RETURN MESSAGE
AOS P2 ; COUNT IT
HRRZ T4,T4 ; CLEAR LEFT HALF OF T4
IDPB T4,P1 ; STORE IT IN RETURN MESSAGE
AOS P2 ; COUNT IT
SOS T2 ; COUNT DOWN THE RECEIVED MESSAGE COUNT
SOJG T2,PADSR1 ; BY TWO AND CONTINUE IF MORE
PADSR3: HRRZ T1,PORTNO ; NO MORE, GET THE PORT NUMBER
MOVEM T1,SDMBLK ; STORE IT
SETZM SDMBLK+1 ; ZERO THE RETURN CODE
TXO P2,XM%QUA ; TURN ON THE QUALIFIED DATA BIT
MOVEM P2,SDMBLK+2 ; STORE COUNT AND BITS
MOVE T1,[POINT 8,NTOBUF] ; GET A POINTER TO THE MESSAGE
MOVEM T1,SDMBLK+3 ; STORE IT
MOVEI T1,SDMBLK ; POINT TO ARG BLOCK
CALL X%SDM## ; AND SEND THE MESSAGE
HRRZ T1,SDMBLK+1 ; GET THE RETURNED STATUS
CAIN T1,XC%SUC ; SUCCESS?
JRST PADSR4 ; YES, GO ON
MOVEM T1,LASTNE ; NO, STORE THE RETURN CODE
CALL NETERR ; REPORT IT
PADSR4: POP P,P4
POP P,P3
POP P,P2
POP P,P1
RET
; HERE ON THE RECEIPT OF AN UNKNOWN MESSAGE TYPE
PADILL:
RET
; HERE TO HANDLE TIMER INTERRUPTS AND PSEUDO TIMER INTERRUPTS INDUCED
; BY THE NETWORK
$TIMER:
MOVEM P,TMRACS+17 ; LETS SAVE THE ACS
MOVEI P,TMRACS ; OF WHATEVER PROCESS WE INTERRUPTED
BLT P,TMRACS+16 ;
MOVE P,[IOWD TMPLEN,TMRPDL] ; USE OUR OWN STACK
MOVE T1,[.FHSLF,,.TIMAL] ; SETUP TO CLEAR ALL PENDING TIMERS
SETZB T2,T3 ; GOOD HOUSEKEEPING
TIMER
ERCAL FATAL
SKIPE TTYFLG ; SKIP IF THE TERMINAL DIDN'T POKE US
JRST $TIME9 ; THE TERMINAL POKED US...JUST DISMISS
HRRZ T2,PAD.4 ; GET THE IDLE-TIMER
JUMPE T2,$TIME9 ; THE TIMER IS DISABLED SO JUST DISMISS
HRRZ T2,PAD.15 ; GET LOCAL-EDITING PARAMETER
CAIN T2,1 ; LOCAL EDITING ENABLED?
JRST $TIME9 ; YES, IGNORE TIMER TICK
SKIPN TTICNT ; ANY CHARACTERS TO FORWARD?
JRST $TIME9 ; NO, JUST DISMISS
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,SDMBLK ; STORE IT
SETZM SDMBLK+1 ; ZERO RETURN STATUS
HRRZ T1,TTICNT ; GET THE COUNT OF CHARACTERS
MOVEM T1,SDMBLK+2 ; STORE IT
MOVE T1,INIPTR ; GET THE INITIAL POINTER TO THE BUFFER
MOVEM T1,SDMBLK+3 ; STORE IT
MOVEI T1,SDMBLK ; POINT AT THE ARG BLOCK
CALL X%SDM##
HRRZ T1,SDMBLK+1 ; GET RETURN STATUS
CAIN T1,XC%SUC ; SUCCESS?
JRST $TIME3 ; YES
CALL NETERR ; NO, COMPLAIN
$TIME3: HRRZ T1,TTICNT ; GET THE COUNT
ADDM T1,XMTCHR ; ADD IT INTO THE TOTAL
AOS XMTPKT ; COUNT THE PACKET
SETZM TTICNT ; ZERO THE BUFFER COUNT
MOVE T1,INIPTR ; GET THE INITIAL POINTER INTO TTIBUF
MOVEM T1,TTIPTR ; STORE IT
$TIME9: MOVE T1,[.FHSLF,,.TIMEL] ; SETUP TO REQUEST A TIMER INTERRUPT
HRRZ T2,PAD.4 ; GET THE IDLE-TIMER VALUE
CAIN T2,0 ; IS IT DISABLED?
MOVEI T2,^D100 ; YES, SETUP FOR A 5 SECOND WAIT
IMULI T2,^D50 ; MULTIPLY BY ^D50 TO GET MILLISECONDS
MOVEI T3,CH.TMR ; CHANNEL TO INTERRUPT ON
TIMER
ERCAL FATAL ; WHOOPS...
SETZM TTYFLG ; CLEAR THE TERMINAL FLAG
MOVSI P,TMRACS ; RESTORE ALL OF THE ACS
BLT P,P
DEBRK
ERCAL FATAL
; INTERRUPT ROUTINE CALLED WHEN THE INPUT BUFFER BECOMES NON-EMPTY
; THIS ROUTINE READS INPUT FROM THE TERMINAL AND STORES IT IN TTYBUF
; THE LF THAT THE MONITOR SUPPLIES AFTER A CR IS THROWN AWAY
$TTYIN:
MOVEM P,TTYACS+17 ; LETS SAVE THE ACS
MOVEI P,TTYACS ; OF WHATEVER PROCESS WE INTERRUPTED
BLT P,TTYACS+16 ;
MOVE P,[IOWD TTPLEN,TTYPDL] ; USE OUR OWN STACK
$TTYI0: MOVEI T1,.PRIIN ;
SIBE ; SKIP IF INPUT BUFFER IS EMPTY
JRST $TTYI1 ; HAVE SOMETHING IN THE BUFFER
MOVSI P,TTYACS ; RESTORE ALL OF THE ACS
BLT P,P
DEBRK ; ALL DONE
ERCAL FATAL
; HERE WHEN WE KNOW THAT THERE IS A CHARACTER IN THE BUFFER
$TTYI1: PBIN ; READ THE USER'S CHARACTER
ANDI T1,177 ; STRIP OFF PARITY (IF ANY)
HRRZ T2,ESCCHR ; GET THE ESCAPE-CHARACTER
JUMPE T2,$TTXI1 ; SKIP THIS TEST IF ESCAPE CHAR IS 0
CAMN T1,T2 ; IS THIS THE ESCAPE CHARACTER?
JRST $ESCAP ; YES, GO PROCESS THE ESCAPE
$TTXI1: HRRZ T2,BRKCHR ; GET THE BREAK-CHARACTER
JUMPE T2,$TTXI2 ; SKIP TEST IF BREAK CHAR IS 0
CAMN T1,T2 ; IS THIS THE BREAK-CHARACTER?
JRST $BREAK ; YES, GO DO BREAK STUFF
$TTXI2: HRRZ T2,STSCHR ; GET THE STATUS-DISPLAY-CHARACTER
JUMPE T2,$TTXI3 ; SKIP TEST IF STATUS CHAR IS 0
CAMN T1,T2 ; IS THIS THE STATUS-DISPLAY CHARACTER?
JRST $STATD ; YES, GO DISPLAY THE CURRENT STATUS
$TTXI3: CAIN T1,015 ; IS IT A <CR>?
CALL [ HRRZ T2,PAD.13 ; GET LINEFEED-INSERTION PARAMETER
TXNE T2,P13%FD ; SHOULD WE INSERT A <LF>?
RET ; YES, LEAVE T20'S <LF> IN THE BUFFER
PBIN ; NO, STRIP THE <LF> THAT FOLLOWS
MOVEI T1,015 ; PUT BACK THE <CR>
RET ] ; AND CONTINUE
HRRZ T2,PAD.2 ; GET ECHO PAD PARAMETER
CAIE T2,0 ; SKIP IF REMOTE ECHO
JRST $TTECH ; LOCAL, GO ECHO THE CHARACTER
$TTYI2: IDPB T1,TTIPTR ; PUT THE CHARACTER IN THE BUFFER
AOS TTICNT ; COUNT IT
HRRZ T2,TTICNT ; GET THE COUNT
CAIL T2,PKTSIZ ; HAVE WE REACHED THE MAX PACKET SIZE?
JRST [ MOVE T2,PAD.15 ; YES, GET THE LOCAL EDITING PARAMETER
CAIE T2,1 ; ARE WE DOING LOCAL-EDITING?
JRST $TTYI3 ; NO, JUST CONTINUE
CAIN T1,015 ; IS THIS A <CR>?
JRST $TTYI3 ; YES, NO NEED TO WAIT
MOVEI T2,2 ; LOAD A 2 INTO T2
MOVEM T2,EDTFLG ; INDICATE A <CR> WAIT
JRST $TTYI3 ] ; AND CONTINUE
HLRZ T2,.ASCII(T1) ; GET DATA-FORWARDING BIT FOR THIS CHAR
TDNE T2,PAD.3 ; DO DATA-FORWARDING?
JRST $TTYI3 ; YES
JRST $TTYI0 ; NO, GO GET ANOTHER CHARACTER
$TTYI3:
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,SDMBLK ; STORE IT
SETZM SDMBLK+1 ; ZERO RETURN STATUS
HRRZ T1,TTICNT ; GET THE COUNT OF CHARACTERS
MOVEM T1,SDMBLK+2 ; STORE IT
MOVE T1,INIPTR ; GET THE INITIAL POINTER TO THE BUFFER
MOVEM T1,SDMBLK+3 ; STORE IT
MOVEI T1,SDMBLK ; POINT AT THE ARG BLOCK
CALL X%SDM##
HRRZ T1,SDMBLK+1 ; GET RETURN STATUS
CAIN T1,XC%SUC ; SUCCESS?
JRST $TTYI4 ; YES
CALL NETERR ; NO, COMPLAIN
$TTYI4: HRRZ T1,TTICNT ; GET THE COUNT
ADDM T1,XMTCHR ; ADD IT INTO THE TOTAL
AOS XMTPKT ; COUNT THE PACKET
SETZM TTICNT ; ZERO THE BUFFER COUNT
MOVE T1,INIPTR ; GET THE INITIAL POINTER INTO TTIBUF
MOVEM T1,TTIPTR ; STORE IT
SETOM TTYFLG ; INDICATE THAT WE CAUSED THE INTERRUPT
MOVX T1,.FHSLF ; POINT TO OURSELF
MOVX T2,CH%TMR ; POINT TO THE TIMER CHANNEL
IIC ; AND CAUSE AN INTERRUPT SO THE IDLE
ERCAL FATAL ; TIMER GETS RESET
JRST $TTYI0 ; AND GO LOOK FOR ANOTHER CHARACTER
; HERE TO HANDLE THE TYPING OF A ESCAPE CHARACTER
$ESCAP:
MOVX T1,.FHSLF ; POINT AT OURSELF
MOVX T2,CH%TTY ; POINT AT THE TTY CHANNEL
DIC ; AND DISABLE HIM
ERCAL FATAL
MOVX T2,CH%TMR ; NOW THE TIMER CHANNEL
DIC
ERCAL FATAL
MOVX T2,CH%NET ; AND THE NETWORK CHANNEL
DIC
ERCAL FATAL
SETOM ESCFLG ; INDICATE ESCAPE
MOVEI T1,.PRIIN
RFMOD ; READ CURRENT TERMINAL STATE
ERCAL FATAL
MOVEM T2,NMODE ; AND SAVE IT
CALL OCRLF ; PRINT A CR/LF
MOVEI T1,.CALL9 ; POINT TO MAIN COMMAND LOOP
MOVEM T1,@LEVTAB+LV.TTY-1 ; STORE IT IN THE PC WORD WE WILL USE
MOVSI P,NETACS
BLT P,P
DEBRK ; ON THIS DEBRK
ERCAL FATAL
; HERE TO HANDLE THE TYPING OF THE STATUS-DISPLAY CHARACTER
$STATD:
CALL OCRLF ; START DISPLAY ON A NEW LINE
HRROI T1,ODBUF ; POINT TO DESTINATION
SETOM T2 ; OUTPUT CURRENT DATE/TIME
MOVE T3,[OT%NDA!OT%TMZ] ; DON'T PRINT THE DATE
ODTIM ; JUST THE TIME OF DAY
ERCAL FATAL
SETZ T2, ; CLEAR T2
IDPB T2,T1 ; TERMENATE WITH A "NULL"
HRROI T1,ODBUF ; POINT TO STRING
CALL .SOUT ; OUTPUT IT
HRROI T1,[ASCIZ\ Port is \]
CALL .SOUT
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RPSBLK ; AND STORE IT
SETZM RPSBLK+1 ; ZERO THE STATUS RETURN WORD
SETZM RPSBLK+2 ; ZERO THE ERROR CONDITION,,PORT STATE
SETZM RPSBLK+3 ; ZERO THE INTERRUPT/BIT MASK
MOVEI T1,RPSBLK ; POINT TO THE ARGUMENT BLOCK
CALL X%RPS## ; AND READ THE PORT STATUS
HRRZ T1,RPSBLK+1 ; GET THE RETURNED STATUS
CAIN T1,XC%SUC ; SUCCESSFUL RETURN?
JRST $STAT1 ; YES, GO ON
MOVEM T1,LASTNE ; SAVE THE ERROR CODES
CALL NETERR ; AND REPORT THE ERROR
$STAT1: HRRZ T1,RPSBLK+2 ; GET THE PORT STATE
MOVE T1,PORTST(T1) ; POINT TO STRING
CALL .SOUT ; AND PRINT IT
HRROI T1,[ASCIZ\ XMT:\]
CALL .SOUT
MOVE T2,XMTPKT ; GET THE NUMBER OF TRANSMITTED PACKETS
MOVEI T3,^D10 ; PRINT IT IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ PKT, \]
CALL .SOUT
MOVE T2,XMTCHR ; NUMBER OF CHARACTERS TRANSMITTED
MOVEI T3,^D10 ; DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ CHAR RCV:\]
CALL .SOUT
MOVE T2,RCVPKT ; NUMBER OF PACKETS RECEIVED
MOVEI T3,^D10 ; IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ PKT, \]
CALL .SOUT
MOVE T2,RCVCHR ; NUMBER OF CHARACTERS RECEIVED
MOVEI T3,^D10 ; IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ CHAR\]
CALL .SOUTR
JRST $TTYI0 ; AND BACK FOR MORE INPUT (IF ANY)
ODBUF: BLOCK 4
; HERE TO HANDLE THE TYPING OF THE BREAK-CHARACTER
$BREAK:
HRRZ T2,PAD.7 ; GET ACTION-ON-BREAK PARAMETER
JUMPE T2,$TTYI0 ; NO ACTION, IGNORE
TXNE T2,P07%ES ; ESCAPE TO COMMAND MODE?
JRST $ESCAP ; YES
TXNE T2,P07%IT ; SEND INTERRUPT MESSAGE?
CALL $BRINT ; YES
TXNE T2,P07%ID ; SEND INDICATION OF BREAK?
CALL $BRIDB ; YES
TXNE T2,P07%DO ; DISCARD OUTPUT?
CALL $BRDIS ; YES
TXNE T2,P07%RE ; SEND RESET?
CALL $BRRES ; YES
JRST $TTYI0 ; AND BACK FOR MORE
; HERE TO SEND AN INTERRUPT MESSAGE TO THE REMOTE-HOST
$BRINT:
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,SIMBLK ; STORE IT
SETZM SIMBLK+1 ; CLEAR RETURN STATUS
SETZM SIMBLK+2 ; SEND A NULL BYTE
MOVEI T1,SIMBLK ; POINT TO ARG BLOCK
CALL X%SIM## ; AND SEND INTERRUPT
HRRZ T1,SIMBLK+1 ; GET RETURN STATUS
CAIN T1,XC%SUC ; SUCCESS?
RET ; YES, RETURN
MOVEM T1,LASTNE ; NO, SAVE THE RETURN CODE
CALL NETERR ; REPORT THE ERROR
RET ; AND RETURN
; HERE TO DISCARD OUTPUT
$BRDIS:
MOVE T1,[PF%WRT!P08%DO] ; GET THE DISCARD OUTPUT BIT
MOVEM T1,PAD.8 ; AND STORE IT
MOVEI T1,.PRIOU ; GET OUTPUT DESIGNATOR
CFOBF ; CLEAR OUTPUT BUFFER
ERCAL FATAL
RET ; AND RETURN
; HERE TO SEND INDICATION OF BREAK TO THE REMOTE-HOST
$BRIDB:
PUSH P,T1
PUSH P,T2
PUSH P,T3
SETZ T3,
MOVE T1,[POINT 8,NTOBUF] ; GET POINTER TO MESSAGE BUFFER
MOVEI T2,3 ; INDICATION OF BREAK MSG #
IDPB T2,T1 ; STORE IT
AOS T3 ; COUNT IT
HRRZ T2,PAD.7 ; GET ACTION-ON-BREAK PARAMETER
TXNN T2,P07%DO ; DISCARD OUTPUT?
JRST $BRID1 ; NO, JUST SEND INDICATION OF BREAK
MOVEI T2,^D8 ; GET PARAMETER #8
IDPB T2,T1 ; STORE IT
AOS T3 ; COUNT IT
MOVEI T2,P08%DO ; DISCARDING OUTPUT
IDPB T2,T1 ; STORE IT
AOS T3 ; COUNT IT
$BRID1: HRRZ T2,PORTNO ; GET THE PORT NUMBER
MOVEM T2,SDMBLK ; STORE IT
SETZM SDMBLK+1 ; CLEAR THE RETURN STATUS
TXO T3,XM%QUA ; SET QUALIFIED DATA BIT
MOVEM T3,SDMBLK+2 ; STORE COUNT AND BITS
MOVE T2,[POINT 8,NTOBUF] ; POINT TO MESSAGE
MOVEM T2,SDMBLK+3 ; STORE IT
MOVEI T1,SDMBLK ; POINT TO ARG BLOCK
CALL X%SDM
HRRZ T1,SDMBLK+1 ; GET RETURNED STATUS
CAIN T1,XC%SUC ; SUCCESSFUL?
JRST $BRID2 ; YES
MOVEM T1,LASTNE ; NO, STORE THE ERROR
CALL NETERR ; REPORT IT
$BRID2: POP P,T3
POP P,T2
POP P,T1
RET ; AND RETURN
; HERE TO RESET THE CIRCUIT
$BRRES:
PUSH P,T1
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RPSBLK ; STORE IT
SETZM RPSBLK+1 ; ZERO THE STATUS RETURN WORD
SETZM RPSBLK+2 ; ZERO THE ERROR CONDITION,,PORT STATE
SETZM RPSBLK+3 ; ZERO THE INTERRUPT/BIT MASK
MOVEI T1,RPSBLK ; POINT TO THE ARG BLOCK
CALL X%RPS## ; AND READ THE PORT STATUS
HRRZ T1,RPSBLK+1 ; GET THE RETURN CODE
CAIE T1,XC%SUC ; SUCCESSFUL?
JRST $BRRE1 ; NO, JUST DISMISS
HRRZ T1,RPSBLK+2 ; YES, GET THE PORT STATE
CAIE T1,XS%RUN ; IS THE PORT RUNNING?
JRST $BRRE1 ; NO, JUST DISMISS
HRRZ T1,PORTNO ; YES, GET THE PORT NUMBER
MOVEM T1,RVCBLK ; STORE IT
SETZM RVCBLK+1 ; CLEAR THE RETURN CODE
SETZM RVCBLK+2 ; CLEAR THE DIAGNOSTIC BYTE
MOVEI T1,RVCBLK ; POINT AT THE ARG BLICK
CALL X%RVC## ; AND RESET THE CIRCUIT
HRRZ T1,RVCBLK+1 ; GET THE RETURN CODE
CAIN T1,XC%SUC ; SUCCESSFUL?
JRST $BRRE1 ; YES
MOVEM T1,LASTNE ; NO, STORE THE ERROR
CALL NETERR ; REPORT IT
$BRRE1: POP P,T1
RET
; HERE TO DO LOCAL ECHOING
$TTECH:
MOVE T2,OMODE ; GET THE ORIGINAL MODE WORD
TXNE T2,FLD(.TTHDX,TT%DUM) ; ORIGINALLY IN HALFDUPLEX MODE?
JRST $TTYI2 ; YES, DON'T DO ANY ECHOING HERE
HRRZ T2,PAD.15 ; GET THE LOCAL EDITING PARAMETER
CAIN T2,1 ; DO LOCAL EDITING?
JRST $TTED ; YES, GO DO IT
HRRZ T2,.ASCII(T1) ; NO, JUST ECHO THE CHARACTER
CALL @T2
JRST $TTYI2 ; NOW STICK IT IN THE INPUT BUFFER
; HERE TO DO LOCAL EDITING
$TTED:
MOVE T2,EDTFLG ; GET THE EDITING FLAG
CAIE T2,2 ; WAITING FOR <CR>?
JRST $TTED3 ; NO, GO ON
CAIN T1,015 ; YES, IS THIS THE <CR> WE WANT?
JRST $TTED2 ; YES
$TTED1: MOVEI T2,7 ; NO, JUST ECHO A BELL
CALL .BOUT
JRST $TTYI0 ; FORGET THE TYPED CHAR, GO LOOK FOR CR
$TTED2: SETZM EDTFLG ; CLEAR THE EDITING FLAG
HRRZ T2,.ASCII(T1) ; GET THE ECHO ROUTINE ADDRESS
CALL @T2 ; AND ECHO THE CHARACTER
JRST $TTYI2 ; AND CONTINUE
$TTED3: HRRZ T2,PAD.16 ; GET THE DELETE CHARACTER
CAME T1,T2 ; IS THIS THE DELETE CHARACTER?
JRST $TED10 ; NO, GO ON
MOVE T2,EDTFLG ; GET THE EDIT FLAG
CAIE T2,1 ; ARE WE DELETING?
JRST $TTED4 ; NO, GO ON
MOVE T2,TTICNT ; GET INPUT BUFFER COUNT
JUMPE T2,$TTED1 ; IF EMPTY, SEND A BELL TO THE USER
LDB T1,TTIPTR ; GET THE LAST CHARACTER IN THE BUFFER
HRRZ T2,.ASCII(T1) ; GET THE ECHO ROUTINE ADDRESS
CALL @T2 ; ECHO THE CHARACTER
SETOM T2 ; LOAD T2 WITH -1
ADJBP T2,TTIPTR ; BACK UP THE INPUT POINTER BY 1
MOVEM T2,TTIPTR ; AND STORE IT
SOS TTICNT ; DECREMENT
JRST $TTED5 ; GO ON
$TTED4: MOVE T2,TTICNT ; GET INPUT BUFFER CHAR COUNT
JUMPE T2,$TTED1 ; IF EMPTY, SEND A BELL
MOVEI T2,1 ; LOAD A 1
MOVEM T2,EDTFLG ; AND INDICATE A DELETE IN PROGRESS
MOVEI T2,"\" ; LOAD A BACKSLASH
CALL .BOUT ; AND PRINT IT
LDB T1,TTIPTR ; GET THE LAST CHARACTER IN THE BUFFER
HRRZ T2,.ASCII(T1) ; GET THE ECHO ROUTINE ADDRESS
CALL @T2 ; AND PRINT IT
SETOM T2 ; LOAD T2 WITH -1
ADJBP T2,TTIPTR ; BACK UP INPUT BUFFER POINTER BY 1
MOVEM T2,TTIPTR ; AND STORE IT
SOS TTICNT ; DECREMENT CHARACTER COUNT
$TTED5: SKIPE TTICNT ; SKIP IF INPUT BUFFER NOW EMPTY
JRST $TTYI0 ; NOT EMPTY, GO ON
HRROI T1,[ASCIZ/\/] ; EMPTY SO PRINT A CLOSING \
CALL .SOUTR ; AND A CRLF
SETZM EDTFLG ; CLEAR THE EDITING FLAG
JRST $TTYI0 ; CONTINUE LOOKING FOR INPUT
$TED10:
HRRZ T2,PAD.17 ; GET THE LINE DELETE CHARACTER
CAME T1,T2 ; IS THIS THE LINE-DELETE CHAR?
JRST $TED20 ; NO, GO ON
MOVE T2,EDTFLG ; GET THE EDIT FLAG
CAIE T2,1 ; ARE WE DELETING?
JRST $TED11 ; NO, GO ON
MOVEI T2,"\" ; YES, FINISH WITH A BACKSLASH
CALL .BOUT
$TED11: HRRZ T2,.ASCII(T1) ; GET ECHO ROUTINE ADDRESS
CALL @T2 ; ECHO THE CHARACTER
CALL OCRLF ; PRINT A CRLF
MOVE T2,INIPTR ; GET THE POINTER TO BEGINNING OF BUFFER
MOVEM T2,TTIPTR ; STORE IT
SETZM TTICNT ; ZERO THE BUFFER CHARACTER COUNT
SETZM EDTFLG ; CLEAR THE EDITING FLAG
JRST $TTYI0 ; AND GO BACK FOR MORE
$TED20:
HRRZ T2,PAD.18 ; GET THE LINE DISPLAY CHARACTER
CAME T1,T2 ; IS THIS THE LINE DISPLAY CHARACTER?
JRST $TED30 ; NO, GO ON
MOVE T2,EDTFLG ; GET THE EDIT FLAG
CAIE T2,1 ; ARE WE DELETING?
JRST $TED21 ; NO, GO ON
MOVEI T2,"\" ; YES, FINISH WITH BACKSLASH
CALL .BOUT ; PRINT IT
SETZM EDTFLG ; CLEAR THE EDITING FLAG
$TED21: HRRZ T2,.ASCII(T1) ; GET THE ECHO ROUTINE ADDRESS
CALL @T2 ; ECHO IT
CALL OCRLF ; PRINT A CRLF
MOVE T3,TTICNT ; GET NUMBER OF CHARACTERS IN THE BUFFER
JUMPE T3,$TTYI0 ; IF NO CHARACTERS, DO NOTHING ELSE
MOVE T4,INIPTR ; GET INITIAL POINTER TO INPUT BUFFER
$TED22: ILDB T1,T4 ; GET A CHARACTER
HRRZ T2,.ASCII(T1) ; GET THE ECHO ROUTINE
CALL @T2 ; PRINT THE CHARACTER
SOJG T3,$TED22 ; DECREMENT COUNT AND GO BACK IF MORE
JRST $TTYI0 ; ALL DONE, BACK FOR MORE
$TED30:
MOVE T2,EDTFLG ; GET THE EDIT FLAG
CAIE T2,1 ; ARE WE DELETING?
JRST $TED31 ; NO, GO ON
MOVEI T2,"\" ; YES, FINISH WITH A BACKSLASH
CALL .BOUT
SETZM EDTFLG ; CLEAR THE EDITING FLAG
$TED31: HRRZ T2,.ASCII(T1) ; GET ECHO ROUTINE ADDRESS
CALL @T2 ; ECHO THE CHARACTER
JRST $TTYI2 ; NOW PUT IT IN THE BUFFER
; HERE TO PRINT CONTROL CHARACTERS
$TOCTL:
HRRZ T2,PAD.15 ; GET THE LOCAL-EDITING PARAMETER
CAIE T2,1 ; ARE WE DOING LOCAL-EDITING?
RET ; JUST RETURN IF NOT
HLRZ T2,.ASCII(T1) ; GET DATA-FORWARDING BIT FOR THIS CHAR
TDNE T2,PAD.3 ; IS THIS A DATA-FORWARDING CHAR?
RET ; YES, LET REMOTE-HOST WORRY ABOUT ECHO
MOVEI T2,"^" ; GET AN UP-ARROW
CALL .BOUT ; PRINT IT
MOVE T2,T1 ; GET THE CHARACTER
ADDI T2,100 ; ADD 100 TO GET A PRINTABLE CHARACTER
CALL .BOUT ; PRINT IT
RET ; AND RETURN
; HERE TO PRINT CARRIAGE RETURNS
$TOCAR:
MOVE T2,T1 ; LOAD THE CHARACTER INTO T2
CALL .BOUT ; AND PRINT IT
HRRZ T2,PAD.13 ; GET LINEFEED INSERTION PARAMETER
TXNN T2,P13%EC ; ADD A LINEFEED?
RET ; NO
MOVEI T2,012 ; LOAD A LINEFEED
CALL .BOUT ; AND PRINT IT
RET
; HERE TO PRINT REGULAR CHARACTERS
$TOCHR:
MOVE T2,T1 ; LOAD THE CHARACTER INTO T2
CALL .BOUT ; AND PRINT IT
RET
; HERE TO PRINT THE <DEL> CHARACTER
$TODEL:
RET ; JUST RETURN, NOTHING TO PRINT
; HERE TO HANDLE THE <ESC> CHARACTER
$TOESC:
HRRZ T2,PAD.15 ; GET THE LOCAL-EDITING PARAMETER
CAIE T2,1 ; ARE WE EDITING?
RET ; NO, JUST RETURN
HLRZ T2,.ASCII(T1) ; GET DATA-FORWARDING BIT FOR THIS CHAR
TDNE T2,PAD.3 ; IS THIS A DATA-FORWARDING CHAR?
RET ; YES, LET REMOTE-HOST WORRY ABOUT ECHO
MOVEI T2,"$" ; YES, PRINT IT AS A $
CALL .BOUT
RET ; AND RETURN
SUBTTL CLEAR COMMAND
.CLEAR:
NOISE (current call)
CONFIRM
SKIPE CALLCT ; IS THERE CURRENTLY AN OPEN CALL?
JRST .CLEA1 ; YES GO CLEAR IT
HRROI T1,[ASCIZ\%There is no call to clear\]
CALL .SOUTR
CALL INIPAD ; RE-INIT THE PAD PARAMETERS (ANYWAY)
RET
.CLEA1: CALL NETTRM ; CALL THE TERMINATION ROUTINE
SETZM CALLCT ; CLEAR THE CALL/CLEAR INTERLOCK
RET
; THIS ROUTINE IS CALLED TO TERMINATE ACCESS TO A GATEWAY PORT
NETTRM:
MOVE T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,TPABLK ; AND STORE IT
SETZM TPABLK+1 ; CLEAR THE RETURN STATUS WORD
MOVEI T1,TPABLK ; LOAD THE ADDRESS OF THE ARG BLOCK
CALL X%TPA## ; AND CALL THE TERMINATION ROUTINE
MOVE P1,TPABLK+1 ; GET THE STATUS RETURNED
CAIN P1,XC%SUC ; SUCCESS?
JRST NETTR1 ; YES, JUST RETURN
MOVEM P1,LASTNE ; SAVE THIS ERROR CODE
; CALL NETERR ; AND NOTIFY USER OF ERROR
NETTR1: SETZM CALLCT ; CLEAR THE INTERLOCK
SETZM ESCFLG ; CLEAR THE ESCAPE FLAG
HRRZ T1,PAD.6 ; GET NET-MSG-DISPLAY PARAMETER
CAIE T1,1 ; DISPLAY STATISTICS?
JRST NETTRX ; NO, JUST EXIT
HRROI T1,[ASCIZ\ Call cleared at \]
CALL .SOUT
HRROI T1,ODBUF ; POINT TO OUTPUT BUFFER
SETOM T2 ; -1 IN T2
MOVE T3,[OT%NDA!OT%TMZ] ; TIME ONLY
ODTIM
ERCAL FATAL
SETZ T2, ; ZERO T2
IDPB T2,T1 ; AND FINISH STRING WITH A "NULL"
HRROI T1,ODBUF ; POINT TO STRING
CALL .SOUT ; AND PRINT IT
HRROI T1,[ASCIZ\ on \]
CALL .SOUT
HRROI T1,ODBUF ; POINT TO OUTPUT BUFFER
SETOM T2 ; -1 IN T2
MOVE T3,[OT%FMN!OT%4YR!OT%DAM!OT%SPA!OT%NTM] ; DATE ONLY
ODTIM
ERCAL FATAL
SETZ T2, ; ZERO T2
IDPB T2,T1 ; AND FINISH STRING WITH A "NULL"
HRROI T1,ODBUF ; POINT TO STRING
CALL .SOUTR ; AND PRINT IT
HRROI T1,[ASCIZ\ Transmitted \]
CALL .SOUT
MOVE T2,XMTCHR ; GET NUMBER OF CHARACTERS TRANSMITTED
MOVEI T3,^D10 ; PRINT IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ characters in \]
CALL .SOUT
MOVE T2,XMTPKT ; GET THE NUMBER OF PACKETS
MOVEI T3,^D10 ; PRINT IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ packets.\]
CALL .SOUTR
HRROI T1,[ASCIZ\ Received \]
CALL .SOUT
MOVE T2,RCVCHR ; GET NUMBER OF CHARACTERS RECEIVED
MOVEI T3,^D10 ; PRINT IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ characters in \]
CALL .SOUT
MOVE T2,RCVPKT ; GET THE NUMBER OF PACKETS
MOVEI T3,^D10 ; PRINT IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ packets.\]
CALL .SOUTR
NETTRX: CALL INIPAD ; RE-INITIALIZE THE PAD PARAMETERS
RET ; AND RETURN
SUBTTL CLOSE COMMAND
.CLOSE: NOISE (log file!)
CONFIRM
NOLOG: SKIPN T1,LOGJFN ; ANY LOG?
RET ; NO, EXIT
SETZM LOGJFN ; CLEAR JFN
CLOSF ; CLOSE IT
JRST FATAL ; SHOULD NEVER HAPPEN
RET
; HERE TO CLOSE A LOG FILE AND TERMINATE SESSION LOGGING
SUBTTL CONTINUE COMMAND
.CONTI:
NOISE (current call)
CONFIRM
SKIPE ESCFLG
JRST .CONT1 ; YES, THERE MAY BE A CALL TO CONTINUE
HRROI T1,[ASCIZ\?There is no call to continue\]
CALL .SOUTR
RET
.CONT1: SETZM ESCFLG ; CLEAR THE ESCAPE FLAG
HRRZ T1,PORTNO ; GET THE PORT NUMBER
MOVEM T1,RPSBLK ; AND STORE IT
SETZM RPSBLK+1 ; ZERO STATUS RETURN WORD
SETZM RPSBLK+2 ; ZERO ERROR CONDITION,,PORT STATE
SETZM RPSBLK+3 ; ZERO THE INTERRUPT/BIT MASK
MOVEI T1,RPSBLK ; POINT TO THE ARG BLOCK
CALL X%RPS## ; AND READ THE PORT STATUS
MOVE T1,RPSBLK+1 ; GET THE RETURN CODE
CAIN T1,XC%SUC ; SUCCESSFUL RETURN?
JRST .CONT2 ; YES, GO ON
MOVEM T1,LASTNE ; SAVE THE ERROR CODES
CALL NETERR ; AND REPORT THE ERROR
HRROI T1,[ASCIZ\?Aborting the call and clearing the circuit\]
CALL .SOUTR
CALL NETTRM ; TERMINATE PORT ACCESS
RET ; SIGH, JUST RETURN
.CONT2: HRRZ T1,RPSBLK+2 ; GET THE STATE OF THE PORT
CAIN T1,XS%RUN ; STILL RUNNING?
JRST .CONT3 ; YES, CONTINUE
CAIN T1,XS%SYN ; SYNCHING?
JRST .CONT3 ; YES, CONTINUE
CAIN T1,XS%UNS ; UNSYNCH?
JRST .CONT3 ; CONTINUE (NET TASK WILL RESET CIRCUIT)
HRROI T1,[ASCIZ\?The PORT is not RUNNING! The current PORT state is \]
CALL .SOUT
HRRZ T1,RPSBLK+2 ; GET THE PORT STATE
MOVE T1,PORTST(T1) ; GET THE POINTER TO THE STRING
CALL .SOUTR
HRROI T1,[ASCIZ\?Aborting and clearing the circuit!\]
CALL .SOUTR
CALL NETTRM ; TERMINATE PORT ACCESS
RET ; SIGH, JUST RETURN
; HERE IF THE PORT IS STILL RUNNING (SYNCHING OR UNSYNCHED)
.CONT3: MOVEI T1,.PRIIN
MOVE T2,NMODE ; GET THE MODE WORD TO RESTORE
SFMOD
ERCAL FATAL
STPAR
ERCAL FATAL
MOVEI T1,.CTTRM ; POINT TO TERMINAL
MOVEM T2,[525252,,525252] ; CCOC WORD
MOVE T3,T2 ; CCOC WORD #2
SFCOC
ERCAL FATAL
MOVEI T1,-5 ; POINT AT JOB
MOVX T2,1B<.TICTI> ; BREAK ON ALL CHARACTERS
STIW
ERCAL FATAL
MOVEI T1,-5 ; SET UP T1 FOR .CAL8A
JRST .CAL8A ; GO ENABLE CHANNELS ANT CONTINUE
SUBTTL DEFINE COMMAND
; SAMPLE COMMAND:
;
; DEFINE (remote-host) host-name (to be) dte-address,dte-sub-address
;
.DEFIN:
NOISE (remote-host)
MOVEI T2,[FLDDB. .CMFLD,CM%SDH,,<host name to be defined>]
COMND
ERCAL FATAL
MOVE P1,[POINT 7,ATMBUF] ; POINT TO THE FIRST CHARACTER
MOVE P2,[POINT 7,DFHOST] ; POINT TO TEMPORARY HOLDING BUFFER
SETZ P3, ; ZERO THE COUNT
ILDB P4,P1 ; GET THE FIRST CHARACTER
CAIE P4,0 ; IS IT A NUL?
JRST .DEFI2 ; NO, GO ON
HRROI T1,[ASCIZ\?No name given\]
CALL .SOUTR ; COMPLAIN
RET
.DEFI1: ILDB P4,P1 ; GET THE NEXT CHARACTER
CAIN P4,0 ; END OF STRING
JRST .DEFI3 ; YES, FINISHED
.DEFI2: AOS P3 ; NO, COUNT IT
CAILE P4,172 ; IS THIS A LOWER CASE ALPHABETIC CHAR?
SKIPA
CAIGE P4,141 ;
SKIPA
SUBI P4,40 ; YES, MAKE IT UPPER CASE
CAIG P3,^D16 ; MORE THAN ^D16 CHARACTERS?
IDPB P4,P2 ; NO, STORE IT
JRST .DEFI1 ; AND CONTINUE
.DEFI3: SETZ P4, ; ZERO P4
IDPB P4,P2 ; TERMINATE STRING
NOISE (as DTE number)
MOVEI T2,[FLDDB. .CMFLD,CM%SDH,,<DTE address or null to delete>]
COMND
ERCAL FATAL
MOVE P1,[POINT 7,ATMBUF] ; POINT TO STRING
MOVE P2,[POINT 7,DFDTEA] ; POINT TO DESTINATION
SETZ P3, ; ZERO COUNT
ILDB P4,P1 ; GET THE FIRST CHARACTER
CAIN P4,0 ; NULL CHARACTER?
JRST DELDEF ; YES, TRY TO DELETE THIS HOST NAME
JRST .DEFI5 ; NO, COPY THE ADDRESS
.DEFI4: ILDB P4,P1 ; GET THE NEXT CHARACTER
CAIN P4,0 ; END OF STRING?
JRST .DEFI6 ; YES
.DEFI5: CAIG P4,"9" ; SKIP IF GREATER THAN THE CHARACTER "9"
CAIGE P4,"0" ; SKIP IF GREATER THAN OR EQUAL "0"
JRST PARERR ; NOT NUMERIC...GO COMPLAIN
AOS P3 ; COUNT IT
CAIG P3,^D15 ; MORE THAN ^D15 CHARACTERS
IDPB P4,P2 ; STORE IT
JRST .DEFI4 ; AND GO BACK FOR MORE
.DEFI6: SETZ P4, ; ZERO P4
IDPB P4,P2 ; AND TERMINATE THE STRING
CAIG P3,^D15 ; MORE THAN ^D15 CHARACTERS?
JRST .DEFI7 ; NO, GET THE DTE SUBADDRESS
HRROI T1,[ASCIZ\?DTE address may not exceed 15 characters\]
CALL .SOUTR ; COMPLAIN
RET
.DEFI7: MOVEI T2,[FLDDB. .CMFLD,CM%SDH,,<DTE subaddress>,,GENRIC]
COMND
ERCAL FATAL
HRRZ T3,T3 ; WHO PARSED THIS FIELD?
CAIN T3,GENRIC ; CONFIRMED?
JRST [ SKIPE LOGJFN ; YES, GO DO COMMAND
CALL LOG
JRST ADDDEF ]
MOVE P1,[POINT 7,ATMBUF] ; POINT TO STRING
MOVE P2,[POINT 7,DFDTES] ; POINT TO DESTINATION
SETZ P3, ; ZERO COUNT
.DEFI8: ILDB P4,P1 ; GET THE NEXT CHARACTER
CAIN P4,0 ; END OF STRING?
JRST .DEFI9 ; YES
CAIG P4,"9" ; SKIP IF GREATER THAN THE CHARACTER "9"
CAIGE P4,"0" ; SKIP IF GREATER THAN OR EQUAL "0"
JRST PRSERR ; NOT NUMERIC...GO COMPLAIN
AOS P3 ; COUNT IT
CAIG P3,^D15 ; MORE THAN ^D15 CHARACTERS
IDPB P4,P2 ; STORE IT
JRST .DEFI8 ; AND GO BACK FOR MORE
.DEFI9: SETZ P4, ; ZERO P4
IDPB P4,P2 ; AND TERMINATE THE STRING
CAIG P3,^D15 ; MORE THAN ^D15 CHARACTERS?
JRST .DEFCF ; NO, GO CONFIRM
HRROI T1,[ASCIZ\?DTE subaddress may not exceed 15 characters\]
CALL .SOUTR ; COMPLAIN
RET
.DEFCF: CONFIRM
; HERE TO ADD A HOST TO THE TABLE (OR CHANGE THE ENTRY IF IT EXISTS ALREADY)
ADDDEF:
MOVEI T1,DTETAB ; POINT TO THE TABLE
MOVE T2,[POINT 7,DFHOST] ; POINTER TO THE HOST NAME TO LOOK FOR
TBLUK
TXNN T2,TL%EXM ; WAS THERE AN EXACT MATCH?
JRST ADDTBL ; NO, GO ADD IT TO THE TABLE
HLRZ P1,(T1) ; POINT TO THE DESTINATION
HRRZ P2,P1 ; POINT TO DEST IN RH
HRLI P2,DFHOST ; POINT TO SOURCE, DEST ALREADY IN RH
BLT P2,^D11(P1) ; AND MOVE THE DATA
RET ; AND RETURN
ADDTBL:
CALL FNDTBL ; FIND THE FIRST FREE TABLE ENTRY
CAIE P1,0 ; WAS THERE A FREE SLOT?
JRST ADDTB1 ; YES, GO ADD THE HOST
HRROI T1,[ASCIZ\?No room to add another host\]
CALL .SOUTR ; GO COMPLAIN
RET ; AND RETURN
ADDTB1: MOVEI T1,DTETAB ; POINT TO THE TABLE
HRLZ T2,P1 ; MAKE TABLE ENTRY ARG
HRRZ P2,P1 ; POINT TO DEST IN RH
HRLI P2,DFHOST ; POINT TO SOURCE, DEST ALREADY IN RH
BLT P2,^D11(P1) ; AND MOVE THE DATA
TBADD ; NOW ADD IT TO THE TABLE
RET
; HERE TO FIND A SLOT IN DTEDAT
; RETURN ADDR OF FREE SLOT IN P1...
; ZERO RETURNED IN P1 IF DTEDAT IS FULL
FNDTBL: MOVEI P1,DTEDAT ; POINT TO THE TOP BLOCK
FNDTB1: SKIPN (P1) ; FIRST WORD OF THIS BLOCK ZERO?
RET ; YES, RETURN THE ADDRESS TO CALLER
ADDI P1,^D12 ; POINT TO NEXT BLOCK
CAIGE P1,DTEEND ; AT THE END?
JRST FNDTB1 ; NO, TRY AGAIN
SETZ P1, ; YES, THE TABLE IS FULL SO ZERO P1
RET ; AND RETURN
; HERE TO DELETE A HOST DEFINITION (IF ONE EXISTS)
DELDEF:
CONFIRM
MOVEI T1,DTETAB ; POINT TO THE TABLE
MOVE T2,[POINT 7,DFHOST] ; POINT TO THE NAME TO LOOK FOR
TBLUK ; LOOK FOR THIS ENTRY
TXNN T2,TL%EXM ; AN EXACT MATCH?
RET ; NO, JUST RETURN
HLRZ P1,(T1) ; POINT TO THE ARG BLOCK
SETZM (P1) ; ZERO THE ENTRY
MOVE T2,T1 ; MOVE THE ENTRY TO BE DELETED TO T2
MOVEI T1,DTETAB ; POINT TO THE TABLE
TBDEL ; AND DELETE THE ENTRY
RET
SUBTTL EXIT COMMAND
.EXIT:
NOISE (from X29PAD)
CONFIRM
SKIPE CALLCT ; WAS THERE A CALL STILL IN PROGRESS?
CALL NETTRM ; YES, CLEAR IT!!!
CALL NOLOG ; TERMINATE LOGGING
HALTF ; RETURN TO EXEC
RET ; CONTINUE PUTS US BACK IN THE PARSER
SUBTTL HELP COMMAND
.HELP:
NOISE (with)
MOVEI T2,[FLDDB. .CMKEY,,HLPTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; WHO PARSED THIS FIELD?
CAIN T3,GENRIC ; JUST CONFIRMED?
JRST .HELP1 ; YES, GIVE GENERAL HELP MESSAGE
HRRZ T2,(T2)
JRST (T2)
HLPTAB: HLPTBL,,HLPTBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRIES
TBL (BREAK,,.HBRK)
TBL (CALL,,.HCALL)
TBL (CLEAR,,.HCLEA)
TBL (CLOSE,,.HCLOS)
TBL (CONTINUE,,.HCONT)
TBL (DEFINE,,.HDEFI)
TBL (EXIT,,.HEXIT)
TBL (HELP,,.HHELP)
TBL (INFORMATION,,.HINFO)
TBL (LOG,,.HLOG)
TBL (PUSH,,.HPUSH)
; TBL (RESET,,.HRESE)
TBL (SET,,.HSET)
TBL (TAKE,,.HTAKE)
TBL (X29PAD,,.HX29P)
HLPTBL==<.-HLPTAB>-1 ; NUMBER OF ENTRIES IN THE TABLE
.HELP1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMINI
CALL .SOUT
RET
.HMINI: ASCIZ\ X29PAD is a program which will allow a user to "SET HOST" to a remote
system the X.25 Gateway. The remote host need not be a DEC computer.
X29PAD has the following commands:
Command Description
BREAK Initiate a BREAK sequence and CONTINUE (if possible)
CALL Initiate a call to a selected REMOTE-HOST
CLEAR Clear a call that was in progress
CLOSE Close the log file opened by the LOG command
CONTINUE Continue a call that was interrupted by the user
DEFINE Define a REMOTE-HOST in terms of its DTE address
EXIT Exit to the EXEC
HELP Give help with X29PAD's commands and operation
INFORMATION Give information on various parameters in X29PAD
LOG Record the terminal session in a designated log file
PUSH Push to a new EXEC
SET Set one of X29PAD's parameters
TAKE Take a command file
To learn how to obtain more information, type:
X29PAD> HELP (with) HELP
\
; HERE TO GIVE HELP WITH THE "BREAK" COMMAND
.HBRK:
NOISE (command)
CONFIRM
HRROI T1,.HMBRK
CALL .SOUT
RET
.HMBRK: ASCIZ\ The BREAK command is used to initiate a break sequence and then
continue the session if possible. The BREAK command will cause
execution of actions specified by the ACTION-ON-BREAK PAD Parameter.
\
; HERE TO GIVE HELP WITH THE "CALL" COMMAND
.HCALL:
NOISE (command)
CONFIRM
HRROI T1,.HMCAL
CALL .SOUT
RET
.HMCAL: ASCIZ\ The CALL command is used to initiate a terminal session with a remote host.
The command format is:
X29PAD>CALL remote-host-name
where the remote-host-name has been defined previously using the DEFINE
command. Typing a ? after CALL will list the names of the remote hosts
that have been defined up to that point.
Optionally, you may elect to supply the actual DTE address and subaddress.
The format is:
X29PAD>CALL dte-address dte-subaddress
where the dte-address is the number of the remote host to which you wish
to connect to and the dte-subaddress is an optional number corresponding
to the desired remote host's subaddress.
If you have not already supplied a network name and password (using the
SET NETWORK command) you will be asked to supply them before the call to
the remote-host will be placed.
\
; HERE TO GIVE HELP WITH THE "CLEAR" COMMAND
.HCLEA:
NOISE (command)
CONFIRM
HRROI T1,.HMCLE
CALL .SOUT
RET
.HMCLE: ASCIZ\ The CLEAR command is used to disconnect a call initiated by a CALL command.
The form of the CLEAR command is:
X29PAD>CLEAR
There are no arguments or options for this command.
\
; HERE TO GIVE HELP WITH THE "CLOSE" COMMAND
.HCLOS:
NOISE (command)
CONFIRM
HRROI T1,.HMCLO
CALL .SOUT
RET
.HMCLO: ASCIZ\ The CLOSE command terminates session logging and closes the log file that
was initiated by using the LOG command. The format of the command is:
X29PAD>CLOSE (log file!)
\
; HERE TO GIVE HELP WITH THE "CONTINUE" COMMAND
.HCONT:
NOISE (command)
CONFIRM
HRROI T1,.HMCON
CALL .SOUT
RET
.HMCON: ASCIZ\ The CONTINUE command allows the user to continue a call that was
interrupted by the typing of the ESCAPE-CHARACTER to return to
command mode. The format of this command is:
X29PAD>CONTINUE (current call)
The CONTINUE command will attempt to restart communications with
the REMOTE-HOST and will notify the user if this is not possible.
\
; HERE TO GIVE HELP WITH THE "DEFINE" COMMAND
.HDEFI:
NOISE (command)
CONFIRM
HRROI T1,.HMDEF
CALL .SOUT
RET
.HMDEF: ASCIZ\ The DEFINE command is used to associate the name of a remote host with
a DTE address and (optionally) a DTE subaddress. The format of this
command is:
X29PAD>DEFINE remote-host-name (to be) dte-address dte-subaddress
where the remote-host-name is an alphanumeric string of up to 16 characters
in length and dte-address and dte-subaddress are numeric strings of up to
15 digits in length.
The DEFINE command may also be used to remove a remote host from the remote
host table. This is done by typing a carriage return after the name of the
remote host you wish to delete. The format is:
X29PAD>DEFINE remote-host-name <carriage-return>
The DEFINE command may also be used to change the DTE address and subaddress
of a remote host that has already been defined by simply defining the remote
host again. The entry for this remote host will be updated in the remote host
table.
\
.HEXIT:
NOISE (command)
CONFIRM
HRROI T1,.HMEXI
CALL .SOUT
RET
.HMEXI: ASCIZ\ The EXIT command causes X29PAD to return the user to TOPS20 command mode.
If a CALL to a REMOTE-HOST is still in progress it will be cleared. If
LOGGING was being done, the log file will be closed and logging terminated.
Typing the TOPS20 CONTINUE command will cause X29PAD to resume execution,
but you must re-enable logging manually.
\
.HHELP:
NOISE (command)
CONFIRM
HRROI T1,.HMHEL
CALL .SOUT
RET
.HMHEL: ASCIZ\ The HELP command is the way a user can obtain more detailed information
relating to the operation of X29PAD than available through the inline
help facility (i.e. "?"). The format of the HELP command is:
X29PAD>HELP (with) argument-1 argument-2 ... argument-n
where argument is a key word in the context of the command it is found in.
For example, typing the following:
X29PAD>HELP (with) SET PAD-PARAMETER IDLE-TIMER <carriage-return>
would give you a description of the IDLE-TIMER parameter which is changeable
via the SET command.
In all cases, typing a ? at any point will give you a list of optional
key words you may elect to supply or you may type a carriage-return at
any point to receive information about the last key word typed in context.
\
.HINFO:
MOVEI T2,[FLDDB. .CMKEY,,HINTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; WHO PARSED THIS FIELD?
CAIN T3,GENRIC ; JUST CONFIRMED?
JRST .HINF1 ; YES, GIVE THE GENERAL HELP INFO MSG
HRRZ T2,(T2)
JRST (T2)
HINTAB: HINTBL,,HINTBL
TBL (DEFAULTS,,.HIDEF)
TBL (LAST-NETWORK-ERROR,,.HINET)
TBL (PAD-PARAMETERS,,.HIPAR)
TBL (REMOTE-HOSTS,,.HIREM)
TBL (STATUS,,.HISTA)
TBL (VERSION,,.HIVER)
HINTBL==<.-HINTAB>-1
.HINF1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMINF
CALL .SOUT
RET
.HMINF: ASCIZ\ The INFORMATION command allows you to obtain information about various
parameters and topics in X29PAD. The format of this command is:
X29PAD>INFORMATION (about) argument
where the user supplied argument is one of the following:
DEFAULTS LAST-NETWORK-ERROR PAD-PARAMETERS
REMOTE-HOSTS STATUS VERSION
For more help with any of these arguments, type:
X29PAD>HELP (with) INFORMATION argument
\
.HIDEF:
NOISE (command)
CONFIRM
HRROI T1,.HMIDE
CALL .SOUT
RET
.HMIDE: ASCIZ\ The INFORMATION (about) DEFAULTS (for) TAKE displays the current default
conditions for the TAKE command.
\
.HINET:
NOISE (command)
CONFIRM
HRROI T1,.HMINE
CALL .SOUT
RET
.HMINE: ASCIZ\ The INFORMATION (about) LAST-NETWORK-ERROR command gives the user a more
verbose description (and possible causes) of the last reported network
error. The format of the command is:
X29PAD>INFORMATION (about) LAST-NETWORK-ERROR
\
; HERE TO GIVE HELP ON "INFORMATION PAD-PARAMETERS" COMMAND
.HIPAR:
NOISE (command)
CONFIRM
HRROI T1,.HMIPA
CALL .SOUT
RET
.HMIPA: ASCIZ\ The INFORMATION (about) PAD-PARAMETERS command allows the user to
display the current state of the PAD. The PAD (Packet Assembly and
Disassembly) parameters are the values that determine how the terminal
will act and exchange data with the remote-host. PAD parameters may be
set either by the remote-host or by the user via the SET PAD-PARAMETER
command. PAD parameters set by the remote-host are denoted by a star (*)
preceeding the parameter. The format of the command is:
X29PAD>INFORMATION (about) PAD-PARAMETERS
For more information on specific PAD parameters, type:
X29PAD>HELP (with) SET PAD-PARAMETER argument
where the argument is one of the following:
ACTION-ON-BREAK CANCEL-CHARACTER CARRIAGE-RETURN-PADDING
DATA-FORWARDING DELETE-CHARACTER DISCARD-OUTPUT
DISPLAY-CHARACTER DTE-TO-NET-FLOW-CONTROL ECHO
ESCAPE-TO-COMMAND-MODE IDLE-TIMER LINE-WIDTH
LINEFEED-INSERTION LINEFEED-PADDING LOCAL-EDITING
NET-TO-DTE-FLOW-CONTROL PAD-SIGNAL-CONTROL RATE
\
; HERE TO GIVE HELP ON "INFORMATION REMOTE-HOSTS" COMMAND
.HIREM:
NOISE (command)
CONFIRM
HRROI T1,.HMIRE
CALL .SOUT
RET
.HMIRE: ASCIZ\ The INFORMATION (about) REMOTE-HOSTS command provides the user with
a list of REMOTE-HOSTS that have been defined via the DEFINE command.
Each REMOTE-HOST will have diaplayed the DTE address and (optionally)
the DTE subaddress associated with it.
The format of the command is:
X29PAD>INFORMATION (about) REMOTE-HOSTS
\
.HISTA:
NOISE (command)
CONFIRM
HRROI T1,.HMIST
CALL .SOUT
RET
.HMIST: ASCIZ\ The INFORMATION (about) STATUS (of X29PAD) command gives the user a summary
of X29PAD's state and counter information. It also displays the current
NETWORK NAME and PASSWORD, ESCAPE-CHARACTER, and STATUS-DISPLAY-CHARACTER.
The format of this command is:
X29PAD>INFORMATION (about) STATUS (of X29PAD)
\
.HIVER:
NOISE (command)
CONFIRM
HRROI T1,.HMIVE
CALL .SOUT
RET
.HMIVE: ASCIZ\ The INFORMATION (about) VERSION command displays the version number and
edit number of X29PAD and the version and edit numbers of the X.25 Gateway
Access Module loaded with X29PAD.
\
; HERE TO GIVE HELP ON "LOG" COMMAND
.HLOG:
NOISE (command)
CONFIRM
HRROI T1,.HMLOG
CALL .SOUT
RET
.HMLOG: ASCIZ\ The LOG command causes your terminal session to be recorded in a file
specified by the user. The format of this command is:
X29PAD>LOG (output to file) output filespec
where output filespec is the filename the user wishes to call the log
file.
\
; HERE TO GIVE HELP ON "PUSH" COMMAND
.HPUSH:
NOISE (command)
CONFIRM
HRROI T1,.HMPUS
CALL .SOUT
RET
.HMPUS: ASCIZ\ The PUSH command is analogous to the TOPS20 Monitor PUSH command. This
command allows you to push to a new copy of the TOPS20 EXEC and pop back
into X29PAD at some later point in time. Popping back from the new EXEC
does not discard the EXEC you pushed to or any subsequent programs running
under it. You may PUSH back down to that EXEC and continue any programs
started by that EXEC.
\
; HERE TO GIVE HELP ON "RESET" COMMAND
;.HRESET:
; HERE TO PARSE "HELP SET"
.HSET:
MOVEI T2,[FLDDB. .CMKEY,,HSETAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; LETS FIND OUT WHO PARSED
CAIN T3,GENRIC ; JUST CONFIRM?
JRST .HSET1 ; YES, GO PRINT SET HELP MESSAGE
HRRZ T2,(T2) ; NO, GET POINTER
JRST (T2) ; AND DISPATCH
.HSET1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMSET
CALL .SOUT
RET
.HMSET: ASCIZ\ The SET command allows you to change or set various parameters and
values used by X29PAD. The format of this command is:
X29PAD>SET argument-1 argument-2 ... argument-n
where argument-1 is one of the following:
DEFAULT ESCAPE-CHARACTER NETWORK
PAD-PARAMETER STATUS-DISPLAY-CHARACTER
and argument-2 through argument-n are dependent on argument-1. For more
information type:
X29PAD>HELP SET argument-1 argument-2 ... argument-n
Use "?" to find out what specific options are available for each argument.
\
HSETAB: HSETBL,,HSETBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRIES
TBL (BREAK-CHARACTER,,.HSBRK)
TBL (DEFAULT,,.HSDEF)
TBL (ESCAPE-CHARACTER,,.HSESC)
TBL (NETWORK,,.HSNT)
TBL (PAD-PARAMETER,,.HSPAD)
TBL (STATUS-DISPLAY-CHARACTER,,.HSSTA)
HSETBL==<.-HSETAB>-1
; HERE TO GIVE HELP ON "SET BREAK-CHARACTER" COMMAND
.HSBRK:
NOISE (command)
CONFIRM
HRROI T1,.HMSBR
CALL .SOUT
RET
.HMSBR: ASCIZ/ The SET BREAK-CHARACTER command allows you to define a special character
which, when typed, will cause X29PAD to perform the actions defined by
the ACTION-ON-BREAK PAD Parameter. This action might be to discard pending
terminal output or possibly reset the network. The format of the command is:
X29PAD>SET BREAK-CHARACTER (to) argument
where argument is the octal value for the ASCII character code you wish to
be the escape character or any printing character in double quotes. An
alternate form of this command is:
X29PAD>SET BREAK-CHARACTER (to) CONTROL argument
This form of the command is used to define the BREAK-CHARACTER to be a
control character. The user supplied argument is a printing character in
double quotes. For example, to set the BREAK-CHARACTER to CONTROL-P you
would type:
X29PAD>SET BREAK-CHARACTER (to) CONTROL "P"
Note that the default BREAK-CHARACTER is CONTROL-X.
/
; HERE TO GIVE HELP ON "SET ESCAPE-CHARACTER" COMMAND
.HSESC:
NOISE (command)
CONFIRM
HRROI T1,.HMSES
CALL .SOUT
RET
.HMSES: ASCIZ/ The SET ESCAPE-CHARACTER command allows you to define a special character
which, when typed, will cause X29PAD to return you to command mode. The
format of the command is:
X29PAD>SET ESCAPE-CHARACTER (to) argument
where argument is the octal value for the ASCII character code you wish to
be the escape character or any printing character in double quotes. An
alternate form of this command is:
X29PAD>SET ESCAPE-CHARACTER (to) CONTROL argument
This form of the command is used to define the ESCAPE-CHARACTER to be a
control character. The user supplied argument is a printing character in
double quotes. For example, to set the ESCAPE-CHARACTER to CONTROL-P you
would type:
X29PAD>SET ESCAPE-CHARACTER (to) CONTROL "P"
Note that the default ESCAPE-CHARACTER is CONTROL-\.
/
; HERE TO PARSE "HELP SET NETWORK"
.HSNT:
MOVEI T2,[FLDDB. .CMKEY,,HSNTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; LETS FIND OUT WHO PARSED
CAIN T3,GENRIC ; JUST CONFIRM?
JRST .HSNT1 ; YES, GO PRINT SET HELP MESSAGE
HRRZ T2,(T2) ; NO, GET POINTER
JRST (T2) ; AND DISPATCH
.HSNT1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMSNT
CALL .SOUT
RET
.HMSNT: ASCIZ\ The SET NETWORK command allows the user to set either the NETWORK NAME
or the NETWORK PASSWORD for the PSI GATEWAY the user wishes to access.
The format of this command is:
X29PAD>SET NETWORK argument-1 argument-2
where argument-1 is either NAME or PASSWORD and argument-2 is dependent
on argument-1.
For more information, type:
X29PAD>HELP (with) SET NETWORK NAME
or
X29PAD>HELP (with) SET NETWORK PASSWORD
\
HSNTAB: HSNTBL,,HSNTBL
TBL (NAME,,.HSNEN)
TBL (PASSWORD,,.HSNEP)
HSNTBL=<.-HSNTAB>-1
; HERE TO GIVE HELP WITH THE "SET NETWORK NAME" COMMAND
.HSNEN:
NOISE (command)
CONFIRM
HRROI T1,.HMSNN
CALL .SOUT
RET
.HMSNN: ASCIZ\ The SET NETWORK NAME command allows the user to set the name of the
network he wishes. The format of this command is:
X29PAD>SET NETWORK NAME (to) argument-1
where argument-1 is the name supplied by your network manager.
Please note that this name is assigned by the network manager and may
be bear no association to the actual PPSN you buy services from.
\
; HERE TO GIVE HELP WITH THE "SET NETWORK PASSWORD" COMMAND
.HSNEP:
NOISE (command)
CONFIRM
HRROI T1,.HMSNP
CALL .SOUT
RET
.HMSNP: ASCIZ\ The SET NETWORK PASSWORD command allows the user to specify the password
required to access the X.25 PSI Gateway. The form of the command is:
X29PAD>SET NETWORK PASSWORD (to) argument-1
where argument-1 is the Gateway access password supplied by your network
manager.
\
; HERE TO PARSE "HELP SET DEFAULT"
.HSDEF:
MOVEI T2,[FLDDB. .CMKEY,,HSDTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; WHO PARSED THIS TIME
CAIN T3,GENRIC ; JUST CONFIRM?
JRST .HSDE1 ; YES
HRRZ T2,(T2)
JRST (T2)
.HSDE1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMSDE
CALL .SOUT
RET
.HMSDE: ASCIZ\ The SET DEFAULT command allows you to set default values for certain X29PAD
command parameters. These parameters affect the actions performed by the
specified command. The format of this command is:
X29PAD>SET DEFAULT argument-1 argument-2 ... argument-n
where argument-1 is one of the following:
LOG TAKE
and argument-2 through argument-n are dependent on argument-1.
For more help, type:
X29PAD>HELP (with) SET DEFAULT argument
where argument is one of the above choices.
\
HSDTAB: HSDTBL,,HSDTBL
TBL (LOG,,.HSDLO)
TBL (TAKE,,.HSDTK)
HSDTBL==<.-HSDTAB>-1
; HERE TO PARSE "HELP SET DEFAULT LOG"
.HSDLO:
MOVEI T2,[FLDDB. .CMKEY,,HDLTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; WHO PARSED?
CAIN T3,GENRIC ; CONFIRM?
JRST .HSDL1 ; YES
HRRZ T2,(T2)
JRST (T2)
.HSDL1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMSDL
CALL .SOUT
RET
.HMSDL: ASCIZ\ The SET DEFAULT LOG command allows you to set certain defaults
for the LOG command. The format of this command is
X29PAD>SET DEFAULT (for) LOG (to) argument-1 argument-2
where argument-1 is one of the following:
APPEND NO SUPERSEDE SUPPRESS
For more information concerning these options, type:
X29PAD>HELP SET DEFAULT LOG argument
\
HDLTAB: HDLTBL,,HDLTBL
TBL (APPEND,,.HSDLA)
TBL (NO,,.HSDLN)
TBL (SUPERSEDE,,.HSDLS)
TBL (SUPPRESS,,.HSDLX)
HDLTBL==<.-HDLTAB>-1
; HERE TO PARSE "HELP SET DEFAULT LOG APPEND"
.HSDLA:
NOISE (command)
CONFIRM
HRROI T1,.HMSLA
CALL .SOUT
RET
.HMSLA: ASCIZ\ The SET DEFAULT LOG APPEND command causes X29PAD to append to an
existing log file rather than supersede it with a new generation.
For example, if you specify that the default for logging should be
APPEND and you issue the LOG command to X29PAD specifying a LOG
file that already exists, X29PAD will append to the existing LOG
file.
You may desire a new generation of LOG file. If so, you may use
the SET DEFAULT LOG SUPERSEDE command to affect this action.
\
; HERE TO PARSE "HELP SET DEFAULT LOG NO"
.HSDLN:
NOISE (command)
CONFIRM
HRROI T1,.HMSLN
CALL .SOUT
RET
.HMSLN: ASCIZ\ The SET DEFAULT LOG NO command has only one option available.
The option is SUPPRESS. This command (SET DEFAULT LOG NO SUPPRESS)
causes X29PAD to include NULLs transmitted by the remote host in
the log file. The format of this command is:
X29PAD>SET DEFAULT (for) LOG (to) NO SUPPRESS (null characters in log file!)
\
; HERE TO PARSE "HELP SET DEFAULT LOG SUPERSEDE"
.HSDLS:
NOISE (command)
CONFIRM
HRROI T1,.HMSLS
CALL .SOUT
RET
.HMSLS: ASCIZ\ The SET DEFAULT LOG SUPERSEDE command causes X29PAD to create
a new generation log file whenever session logging is initiated.
\
; HERE TO PARSE "HELP SET DEFAULT LOG SUPPRESS"
.HSDLX:
NOISE (command)
CONFIRM
HRROI T1,.HMSLX
CALL .SOUT
RET
.HMSLX: ASCIZ\ The SET DEFAULT LOG SUPPRESS command causes X29PAD to discard
nulls sent by the remote host and not include them in the log file.
\
; HERE TO PARSE "HELP SET DEFAULT TAKE"
.HSDTK:
MOVEI T2,[FLDDB. .CMKEY,,HDTTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; WHO PARSED?
CAIN T3,GENRIC ; CONFIRM?
JRST .HSDT1 ; YES
HRRZ T2,(T2)
JRST (T2)
.HSDT1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMSDT
CALL .SOUT
RET
.HMSDT: ASCIZ\ The SET DEFAULT TAKE command allows the user to specify and
control the actions of the TAKE command. The format of this command is:
X29PAD>SET DEFAULT (for) TAKE (to) argument-1 argument-2
where argument-1 is one of the following:
ALLOW DISALLOW ECHO NO
and argument-2 is dependent on argument-1.
For more help on the options, type:
X29PAD>HELP SET DEFAULT TAKE argument
\
HDTTAB: HDTTBL,,HDTTBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRYS
TBL (ALLOW,,.HSDTA)
TBL (DISALLOW,,.HSDTD)
TBL (ECHO,,.HSDTE)
TBL (NO,,.HSDTN)
HDTTBL==<.-HDTTAB>-1 ; NUMBER OF ENTRYS IN THE TABLE
; HERE TO GIVE HELP ON "SET DEFAULT TAKE ALLOW" COMMAND
.HSDTA:
NOISE (command)
CONFIRM
HRROI T1,HMSDTA
CALL .SOUT
RET
HMSDTA: ASCIZ\ The SET DEFAULT TAKE ALLOW command causes X29PAD's TAKE command
processor to ignore errors while processing command files. The
format of this command is:
X29PAD>SET DEFAULT (for) TAKE (to) ALLOW (errors during "TAKE" files)
\
; HERE TO GIVE HELP ON "SET DEFAULT TAKE DISALLOW" COMMAND
.HSDTD:
NOISE (command)
CONFIRM
HRROI T1,HMSDTD
CALL .SOUT
RET
HMSDTD: ASCIZ\ The SET DEFAULT TAKE DISALLOW command causes X29PAD's command
processor to abort the processing of a command file if an error
is encountered during processing. The format of this command is:
X29PAD>SET DEFAULT (for) TAKE (to) DISALLOW (errors during "TAKE" file)
\
; HERE TO GIVE HELP ON "SET DEFAULT TAKE ECHO" COMMAND
.HSDTE:
NOISE (command)
CONFIRM
HRROI T1,HMSDTE
CALL .SOUT
RET
HMSDTE: ASCIZ\ The SET DEFAULT TAKE ECHO command causes the X29PAD command
processor to echo all commands taken from a command file via
the TAKE command. The format of this command is:
X29PAD>SET DEFAULT (for) TAKE (to) ECHO (commands from "TAKE" file)
\
; HERE TO PARSE "HELP SET DEFAULT TAKE NO"
.HSDTN:
MOVEI T2,[FLDDB. .CMKEY,,HTNTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; WHO PARSED?
CAIN T3,GENRIC ; JUST CONFIRM?
JRST .HSTN1 ; YES
HRRZ T2,(T2)
JRST (T2)
.HSTN1:
SKIPE LOGJFN
CALL LOG
HRROI T1,HMSDTN
CALL .SOUT
RET
HMSDTN: ASCIZ\ The SET DEFAULT TAKE NO command has only one option. This option
is ECHO. The SET DEFAULT TAKE NO ECHO command causes X29PAD's
command processor to suppress the display of commands taken
from a command file via the TAKE command. The format of this
command is:
X29PAD>SET DEFAULT (for) TAKE (to) NO ECHO (commands from "TAKE" file)
\
HTNTAB: HTNTBL,,HTNTBL
TBL (ECHO,,.HSTNE)
HTNTBL==<.-HTNTAB>-1
; HERE TO GIVE HELP ON "SET DEFAULT TAKE NO ECHO" COMMAND
.HSTNE:
NOISE (command)
CONFIRM
HRROI T1,HMSTNE
CALL .SOUT
RET
HMSTNE: ASCIZ\ The SET DEFAULT TAKE NO ECHO command causes X29PAD's command
processor to suppress the display of commands taken from
a command file via the TAKE command. The format of this
command is:
X29PAD>SET DEFAULT (for) TAKE (to) NO ECHO (commands from "TAKE" file)
\
; HERE TO PARSE "HELP SET PAD-PARAMETER"
.HSPAD:
MOVEI T2,[FLDDB. .CMKEY,,HSPTAB,<>,,GENRIC]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; LETS FIND OUT WHO PARSED
CAIN T3,GENRIC ; JUST CONFIRM?
JRST .HSPA1 ; YES, GO PRINT SET PAD HELP MESSAGE
HRRZ T2,(T2) ; NO, GET POINTER
JRST (T2) ; AND DISPATCH
.HSPA1:
SKIPE LOGJFN
CALL LOG
HRROI T1,.HMSPA
CALL .SOUT
RET
.HMSPA: ASCIZ\ The SET PAD-PARAMETER command allows you to set the parameters which
control the interaction of your terminal and the REMOTE-HOST. The
format of the command is:
X29PAD>SET PAD-PARAMETER argument-1 (to) argument-2 ... argument-n
where argument-1 is one of the following:
ACTION-ON-BREAK CANCEL-CHARACTER CARRIAGE-RETURN-PADDING
DATA-FORWARDING DELETE-CHARACTER DISCARD-OUTPUT
DISPLAY-CHARACTER DTE-TO-NET-FLOW-CONTROL ECHO
ESCAPE-TO-COMMAND-MODE IDLE-TIMER LINE-WIDTH
LINEFEED-INSERTION LINEFEED-PADDING LOCAL-EDITING
NET-TO-DTE-FLOW-CONTROL PAD-SIGNAL-CONTROL RATE
and argument-2 through argument-n are dependent on argument-1.
For more help, type:
X29PAD>HELP SET PAD-PARAMETER argument-1
You may use "?" after PAD-PARAMETER to obtain a list choices for argument-1.
\
HSPTAB: HSPTBL,,HSPTBL ; ACTUAL,,MAX NUMBER OF ENTRIES
TBL (ACTION-ON-BREAK,,.HSP07) ; X.3 PAD PARAMETER 7
TBL (CANCEL-CHARACTER,,.HSP17) ; X.3 PAD PARAMETER 17
TBL (CARRIAGE-RETURN-PADDING,,.HSP09) ; X.3 PAD PARAMETER 9
TBL (DATA-FORWARDING,,.HSP03) ; X.3 PAD PARAMETER 3
TBL (DELETE-CHARACTER,,.HSP16) ; X.3 PAD PARAMETER 16
TBL (DISCARD-OUTPUT,,.HSP08) ; X.3 PAD PARAMETER 8
TBL (DISPLAY-CHARACTER,,.HSP18) ; X.3 PAD PARAMETER 18
TBL (DTE-TO-NET-FLOW-CONTROL,,.HSP12) ; X.3 PAD PARAMETER 12
TBL (ECHO,,.HSP02) ; X.3 PAD PARAMETER 2
TBL (ESCAPE-TO-COMMAND-MODE,,.HSP01) ; X.3 PAD PARAMETER 1
TBL (IDLE-TIMER,,.HSP04) ; X.3 PAD PARAMETER 4
TBL (LINE-WIDTH,,.HSP10) ; X.3 PAD PARAMETER 10
TBL (LINEFEED-INSERTION,,.HSP13) ; X.3 PAD PARAMETER 13
TBL (LINEFEED-PADDING,,.HSP14) ; X.3 PAD PARAMETER 14
TBL (LOCAL-EDITING,,.HSP15) ; X.3 PAD PARAMETER 15
TBL (NET-TO-DTE-FLOW-CONTROL,,.HSP05) ; X.3 PAD PARAMETER 5
TBL (PAD-SIGNAL-CONTROL,,.HSP06) ; X.3 PAD PARAMETER 6
TBL (RATE,,.HSP11) ; X.3 PAD PARAMETER 11
HSPTBL==<.-HSPTAB>-1
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER ESCAPE-TO-COMMAND-MODE" COMMAND
.HSP01:
NOISE (command)
CONFIRM
HRROI T1,HMSP01
CALL .SOUT
RET
HMSP01: ASCIZ\ The SET PAD-PARAMETER ESCAPE-TO-COMMAND-MODE command is used
to set X.3 PAD Parameter 1 to one of two states. If PERMITTED,
the user may return to command mode by typing the ESCAPE-CHARACTER.
If PROHIBITED, typing the ESCAPE-CHARACTER will not return the user
to command mode. The format of this command is:
X29PAD>SET PAD-PARAMETER ESCAPE-TO-COMMAND-MODE (to) argument
where argument is one of the following:
PERMITTED PROHIBITED
NOTE: The state of this PAD parameter is currently ignored by X29PAD.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER ECHO" COMMAND
.HSP02:
NOISE (command)
CONFIRM
HRROI T1,HMSP02
CALL .SOUT
RET
HMSP02: ASCIZ\ The SET PAD-PARAMETER ECHO command allows the user to set the
X.3 PAD Parameter #2 to specify whether the echoing of characters
typed by the user will be done by X29PAD (LOCAL-ECHO) or by the
REMOTE-HOST (REMOTE-ECHO). The format of this command is:
X29PAD>SET PAD-PARAMETER ECHO (to) argument
where argument is one of the following:
LOCAL-ECHO REMOTE-ECHO
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER DATA-FORWARDING" COMMAND
.HSP03:
NOISE (command)
CONFIRM
HRROI T1,HMSP03
CALL .SOUT
RET
HMSP03: ASCIZ\ The SET PAD-PARAMETER DATA-FORWARDING command allows the user to set
X.3 PAD Parameter - 3. This PAD Parameter is used to determine the
set of characters that will cause data typed by the user to be sent
to the REMOTE-HOST. This parameter may be set to one of the following:
ALPHANUMERICS CARRIAGE-RETURN CONTROL-CHARACTERS
EDITING-CHARACTERS ESCAPE-CHARACTERS FORMS-CONTROL-CHARACTERS
NO-SIGNAL OTHER-CHARACTERS TERMINATOR-CHARACTERS
The following are legal combinations of the above:
CARRIAGE-RETURN (and) ESCAPE-CHARACTERS
CARRIAGE-RETURN (and) TERMINATOR-CHARACTERS
CARRIAGE-RETURN, ESCAPE-CHARACTERS, EDITING-CHARACTERS, TERMINATOR-CHARACTERS,
FORMS-CONTROL-CHARACTERS, (and) CONTROL-CHARACTERS
All other combinations are illegal.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER IDLE-TIMER" COMMAND
.HSP04:
NOISE (command)
CONFIRM
HRROI T1,HMSP04
CALL .SOUT
RET
HMSP04: ASCIZ\ The SET PAD-PARAMETER IDLE-TIMER command allows the user to
set X.3 PAD Parameter 4. This parameter may also be set by the
REMOTE-HOST. It affects the sending of data from X29PAD to the
REMOTE-HOST. Its format is:
X29PAD>SET PAD-PARAMETER IDLE-TIMER (to) argument
where the argument is either the keyword "DISABLED" or an interval
from 0.05 seconds to 12.75 seconds in 0.05 second increments. If
the IDLE-TIMER is set, data typed by the user will be sent to the
REMOTE-HOST at the set interval. (Data will also be sent if a
character is typed that satisfies the conditions specified by the
DATA-FORWARDING PAD parameter.) If the IDLE-TIMER is DISABLED, data
will be sent when the input buffer is full or by typing a character
that satisfies the DATA-FORWARDING conditions.
NOTE: The IDLE-TIMER is ignored if LOCAL-EDITING is being done.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER NET-TO-DTE-FLOW-CONTROL" COMMAND
.HSP05:
NOISE (command)
CONFIRM
HRROI T1,HMSP05
CALL .SOUT
RET
HMSP05: ASCIZ\ The SET PAD-PARAMETER NET-TO-DTE-FLOW-CONTROL command allows
the user to set X.3 PAD Parameter #5. This parameter enables
or disables the use of XON and XOFF to control data flow from
the local host to the user's terminal. The format of this command
is:
X29PAD>SET PAD-PARAMETER NET-TO-DTE-FLOW-CONTROL (to) argument
where argument is either DISABLED or ENABLED.
NOTE: X29PAD does not currently use X.3 PAD Parameter #5.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER PAD-SIGNAL-CONTROL" COMMAND
.HSP06:
NOISE (command)
CONFIRM
HRROI T1,HMSP06
CALL .SOUT
RET
HMSP06: ASCIZ\ The SET PAD-PARAMETER PAD-SIGNAL-CONTROL command allows
the user to set X.3 PAD Parameter #x.
NOTE: X29PAD currently does not use this parameter in its operation.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER ACTION-ON-BREAK" COMMAND
.HSP07:
NOISE (command)
CONFIRM
HRROI T1,HMSP07
CALL .SOUT
RET
HMSP07: ASCIZ\ The SET PAD-PARAMETER ACTION-ON-BREAK command allows the user to set X.3
PAD Parameter - 7 which determine the action X29PAD will take when the user
types the predefined BREAK-CHARACTER. This parameter may be set to one of
the following:
DISCARD-OUTPUT ESCAPE INDICATE INTERRUPT
NO-ACTION RESET
The following is the only legal combination of the above:
DISCARD-OUTPUT, INDICATE, INTERRUPT
All other combinations are illegal.
\
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER DISCARD-OUTPUT" COMMAND
.HSP08:
NOISE (command)
CONFIRM
HRROI T1,HMSP08
CALL .SOUT
RET
HMSP08: ASCIZ\ The SET PAD-PARAMETER DISCARD-OUTPUT command allows the user
to set X.3 PAD Parameter. X29PAD uses this parameter to determine
whether to display data from the remote-host on the user's terminal
or to discard that data.
NOTE: This command is implemented for completeness and should not be
set by the user.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER CARRIAGE-RETURN-PADDING" COMMAND
.HSP09:
NOISE (command)
CONFIRM
HRROI T1,HMSP09
CALL .SOUT
RET
HMSP09: ASCIZ\ The SET PAD-PARAMETER CARRIAGE-RETURN-PADDING command allows
the user to set X.3 PAD Parameter #9. This parameter determines
the number of null characters to be sent to the user's terminal
after a carriage return is transmitted.
NOTE: X29PAD does not use this parameter in its operation.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER LINE-WIDTH" COMMAND
.HSP10:
NOISE (command)
CONFIRM
HRROI T1,HMSP10
CALL .SOUT
RET
HMSP10: ASCIZ\ The SET PAD-PARAMETER LINE-WIDTH command allows the user to set
X.3 PAD Parameter #10.
NOTE: X29PAD currently does not use this PAD Parameter.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER RATE" COMMAND
.HSP11:
NOISE (command)
CONFIRM
HRROI T1,HMSP11
CALL .SOUT
RET
HMSP11: ASCIZ\ The SET PAD-PARAMETER RATE command allows the user to set
X.3 PAD Parameter #11.
NOTE: X29PAD currently does not make use of this PAD parameter.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER DTE-TO-NET-FLOW-CONTROL" COMMAND
.HSP12:
NOISE (command)
CONFIRM
HRROI T1,HMSP12
CALL .SOUT
RET
HMSP12: ASCIZ\ The SET PAD-PARAMETER DTE-TO-NET-FLOW-CONTROL command allows
the user to set X.3 PAD Parameter #12. This parameter enables
or disables the use of XON and XOFF to control data flow to the
local host from the user's terminal. The format of this command
is:
X29PAD>SET PAD-PARAMETER DTE-TO-NET-FLOW-CONTROL (to) argument
where argument is either DISABLED or ENABLED.
NOTE: X29PAD does not currently use X.3 PAD Parameter #5.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER LINEFEED-INSERTION" COMMAND
.HSP13:
NOISE (command)
CONFIRM
HRROI T1,HMSP13
CALL .SOUT
RET
HMSP13: ASCIZ\ The SET PAD-PARAMETER LINEFEED-INSERTION command allows the user to set
X.3 PAD Parameter #13. This parameter determines when (if ever) X29PAD
should insert a linefeed after a carriage return in the data stream.
The format of this command is:
X29PAD>SET PAD-PARAMETER LINEFEED-INSERTION (to be done after) argument
where argument is one of the following:
ECHOED NEVER RECEIVED SEND
NOTE: Currently X29PAD does not do LINEFEED-INSERTION after carriage
returns in the received data stream.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER LINEFEED-PADDING" COMMAND
.HSP14:
NOISE (command)
CONFIRM
HRROI T1,HMSP14
CALL .SOUT
RET
HMSP14: ASCIZ\ The SET PAD-PARAMETER LINEFEED-PADDING command allows the user
to set X.3 PAD Parameter #14.
NOTE: X29PAD currently does not use this parameter in its operation.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER LOCAL-EDITING" COMMAND
.HSP15:
NOISE (command)
CONFIRM
HRROI T1,HMSP15
CALL .SOUT
RET
HMSP15: ASCIZ\ The SET PAD-PARAMETER LOCAL-EDITING command allows the user to set X.3 PAD
Parameter 15. The LOCAL-EDITING parameter determines whether or not X29PAD
does editing of user input. The format of this command is:
X29PAD>SET PAD-PARAMETER LOCAL-EDITING (to) argument
where argument is either the keyword "DISABLED" or "ENABLED".
If LOCAL-EDITING is ENABLED, the DELETE-CHARACTER, CANCEL-CHARACTER, and
DISPLAY-CHARACTER can be used to modify user input before it is sent to
the REMOTE-HOST. Data will be sent to the REMOTE-HOST whenever a character
is typed that meets the DATA-FORWARDING criteria or when the input buffer
becomes full. The IDLE-TIMER is ignored if LOCAL-EDITING is enabled.
For more information, type:
X29PAD>HELP SET PAD-PARAMETER argument
where argument is one of the following:
CANCEL-CHARACTER DELETE-CHARACTER DISPLAY-CHARACTER
NOTE: If data is sent because the input buffer was full, all characters
typed are ignored (and a BELL echoed) until a CARRIAGE-RETURN is typed.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER DELETE-CHARACTER" COMMAND
.HSP16:
NOISE (command)
CONFIRM
HRROI T1,HMSP16
CALL .SOUT
RET
HMSP16: ASCIZ\ The SET PAD-PARAMETER DELETE-CHARACTER command allows you to set X.3 PAD
Parameter - 16. This parameter specifies the character that X29PAD will
interpret as its DELETE-CHARACTER whenever LOCAL-EDITING is ENABLED. Typing
this character will cause X29PAD to remove one character from the buffer of
characters waiting to be sent to the REMOTE-HOST. The format of the command
is:
X29PAD>SET PAD-PARAMETER DELETE-CHARACTER (to) argument
where argument is the octal value for the ASCII character code you wish
to be the DELETE-CHARACTER or any printing character in double quotes.
An alternate form of this command is:
X29PAD>SET PAD-PARAMETER DELETE-CHARACTER (to) CONTROL argument
This form of the command is used to define the DELETE-CHARACTER to be a
control character. The user supplied argument is a printing character in
double quotes. For example, to set the DELETE-CHARACTER to CONTROL-H you
would type:
X29PAD>SET PAD-PARAMETER DELETE-CHARACTER (to) CONTROL "H"
Note that the default DELETE-CHARACTER is RUBOUT (octal 177).
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER CANCEL-CHARACTER" COMMAND
.HSP17:
NOISE (command)
CONFIRM
HRROI T1,HMSP17
CALL .SOUT
RET
HMSP17: ASCIZ\ The SET PAD-PARAMETER CANCEL-CHARACTER command allows you to set X.3 PAD
Parameter - 17. This parameter specifies the character that X29PAD will
interpret as its line-delete character whenever LOCAL-EDITING is ENABLED.
Typing this character will cause X29PAD to remove ALL characters from the
buffer of characters waiting to be sent to the REMOTE-HOST.
The format of the command is:
X29PAD>SET PAD-PARAMETER CANCEL-CHARACTER (to) argument
where argument is the octal value for the ASCII character code you wish
to be the status display character or any printing character in double
quotes. An alternate form of this command is:
X29PAD>SET PAD-PARAMETER CANCEL-CHARACTER (to) CONTROL argument
This form of the command is used to define the CANCEL-CHARACTER to be a
control character. The user supplied argument is a printing character in
double quotes. For example, to set the CANCEL-CHARACTER to CONTROL-X you
would type:
X29PAD>SET PAD-PARAMETER CANCEL-CHARACTER (to) CONTROL "X"
Note that the default CANCEL-CHARACTER is CONTROL-U.
\
; HERE TO GIVE HELP WITH THE "SET PAD-PARAMETER DISPLAY-CHARACTER" COMMAND
.HSP18:
NOISE (command)
CONFIRM
HRROI T1,HMSP18
CALL .SOUT
RET
HMSP18: ASCIZ\ The SET PAD-PARAMETER DISPLAY-CHARACTER command allows you to set X.3 PAD
Parameter - 18. This parameter specifies the character that X29PAD will
interpret as its line-display character whenever LOCAL-EDITING is ENABLED.
Typing this character will cause X29PAD to redisplay the contents of the
buffer of characters waiting to be sent to the REMOTE-HOST.
The format of the command is:
X29PAD>SET PAD-PARAMETER DISPLAY-CHARACTER (to) argument
where argument is the octal value for the ASCII character code you wish to
be the DISPLAY-CHARACTER or any printing character in double quotes. An
alternate form of this command is:
X29PAD>SET PAD-PARAMETER DISPLAY-CHARACTER (to) CONTROL argument
This form of the command is used to define the DISPLAY-CHARACTER to be a
control character. The user supplied argument is a printing character in
double quotes. For example, to set the DISPLAY-CHARACTER to CONTROL-L you
would type:
X29PAD>SET STATUS-DISPLAY-CHARACTER (to) CONTROL "L"
Note that the default DISPLAY-CHARACTER is CONTROL-R.
\
; HERE TO GIVE HELP WITH THE "SET STATUS-DISPLAY-CHARACTER" COMMAND
.HSSTA:
NOISE (command)
CONFIRM
HRROI T1,.HMSSC
CALL .SOUT
RET
.HMSSC: ASCIZ\ The SET STATUS-DISPLAY-CHARACTER command allows you to define a special
character which, when typed, will cause X29PAD to display the current call.
status. The format of the command is:
X29PAD>SET STATUS-DISPLAY-CHARACTER (to) argument
where argument is the octal value for the ASCII character code you wish
to be the status display character or any printing character in double
quotes. An alternate form of this command is:
X29PAD>SET STATUS-DISPLAY-CHARACTER (to) CONTROL argument
This form of the command is used to define the STATUS-DISPLAY-CHARACTER to
be a control character. The user supplied argument is a printing character
in double quotes. For example, to set the STATUS-DISPLAY-CHARACTER to
CONTROL-P, you would type:
X29PAD>SET STATUS-DISPLAY-CHARACTER (to) CONTROL "P"
Note that the default STATUS-DISPLAY-CHARACTER is CONTROL-A.
\
; HERE TO PARSE "HELP TAKE"
.HTAKE:
NOISE (command)
CONFIRM
HRROI T1,.HMTAK
CALL .SOUT
RET
.HMTAK: ASCIZ\ The TAKE command allows the user to direct X29PAD to execute
a series of commands from a specified file. The format of this
command is:
X29PAD>TAKE (commands from) file-spec
where file-spec is the name of the file containing commands for
X29PAD to execute. After the file-spec type a comma followed
by a carriage return to enter subcommand mode. There the user
may modify the actions of the command processor by entering
various subcommands.
\
.HX29P:
CONFIRM
HRROI T1,HLPMSG
CALL .SOUT
RET
HLPMSG: ASCIZ\ X29PAD is a program which will allow a user to "SET HOST" to a remote
system an X.25 Gateway. The remote host need not be a DEC computer.
Here is a list of useful things to know about X29PAD:
o X29PAD will take commands from PS:<directory-name>X29PAD.INIT
when it is started. This file may contain commands to define
remote hosts, set special characters, or set the network name
and password you wish to access.
o You should not use the SET PAD-PARAMETERS command to change
PAD Parameters in the middle of a call.
o PAD Parameters are reset to a known state everytime you place
an outgoing call.
o There is no mechanism (at this time) to allow you to place a
collect call.
\
SUBTTL INFORMATION COMMAND
.INFORM:
NOISE (about)
MOVEI T2,[FLDDB. .CMKEY,,INFTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T2,(T2)
JRST (T2)
INFTAB: INFTBL,,INFTBL
TBL (DEFAULTS,,.IDEF)
TBL (LAST-NETWORK-ERROR,,.INETE)
TBL (PAD-PARAMETERS,,.IPARM)
TBL (REMOTE-HOSTS,,.IREMH)
TBL (STATUS,,.ISTAT)
TBL (VERSION,,.IVERS)
INFTBL==<.-INFTAB>-1
; HERE TO DISPLAY PARAMETERS INFORMATION
.IPARM:
CONFIRM
HRROI T1,[ASCIZ\ Current PAD Parameters are:
\]
CALL .SOUT
; .
; .
; .
; HERE TO DISPLAY ACTION-ON-BREAK SETTING
IPABR:
MOVE T4,PAD.7
CALL WHOSET ; WHO SET THIS PARAMETER?
HRROI T1,[ASCIZ\ACTION-ON-BREAK (is) \]
CALL .SOUT
HRRZ S,PAD.7 ; GET THE BREAK CHARACTER CODE
MOVE T3,[-6,,ABRTXT] ; SET THE INDEX AND COUNT
HRROI T4,[ASCIZ\ \] ; BLANK TXT
CALL IPSUB ; GO PRINT SET FUNCTIONS
; HERE TO DISPLAY CANCEL-CHARACTER SETTING
IPCAN: MOVE T4,PAD.17
CALL WHOSET ; WHO SET THIS PAD PARAMETER
HRROI T1,[ASCIZ\CANCEL-CHARACTER (is) \]
CALL .SOUT
HRRZ T2,PAD.17 ; GET PAD.17 VALUE
CAIG T2,177 ;
CAIGE T2,0 ; BETWEEN 0 AND 177?
JRST IPCA.3 ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST IPCA.1 ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST IPCA.X
IPCA.1: CAILE T2,37 ; A CONTROL CHARACTER?
JRST IPCA.2 ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
IPCA.2: CALL .BOUT
JRST IPCA.X
IPCA.3: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPCA.X: CALL OCRLF
; HERE TO DISPLAY CARRIAGE-RETURN-PADDING SETTING
IPCRP: MOVE T4,PAD.9
CALL WHOSET
HRROI T1,[ASCIZ\CARRIAGE-RETURN-PADDING (is) \]
CALL .SOUT
HRRZ T2,PAD.9 ; GET PAD.9 VALUE
CAIE T2,0 ; PADDING BEING DONE?
JRST IPCR.1 ; YES
HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
JRST IPCR.X
IPCR.1: CAIG T2,7 ; BETWEEN
CAIGE T2,1 ; 1 AND 7?
JRST IPCR.2 ; OUT OF RANGE
ADDI T2,60 ; MAKE IT AN ASCII CHARACTER
MOVEI T3,^D10
CALL .BOUT
HRROI T1,[ASCIZ\ CHARACTER-TIME\]
CALL .SOUT
HRRZ T2,PAD.9 ; GET PAD.9 VALUE
CAIG T2,1 ; GREATER THAN 1?
JRST IPCR.X ; NO, FINISH LINE
MOVEI T2,"S"
CALL .BOUT
JRST IPCR.X
IPCR.2: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPCR.X: CALL OCRLF
; HERE TO DISPLAY DATA-FORWARDING SETTING
IPDFW:
MOVE T4,PAD.3
CALL WHOSET
HRROI T1,[ASCIZ\DATA FORWARDING (is done on) \]
CALL .SOUT
HRRZ S,PAD.3 ; GET THE BREAK CHARACTER CODE
MOVE T3,[-11,,DFWTXT] ; SET THE INDEX AND COUNTER
HRROI T4,[ASCIZ\ \] ; BLANK TXT
CALL IPSUB ; GO PRINT SET FUNCTIONS
; HERE TO DISPLAY THE DELETE-CHARACTER
IPDEL: MOVE T4,PAD.16
CALL WHOSET
HRROI T1,[ASCIZ\DELETE-CHARACTER (is) \]
CALL .SOUT
HRRZ T2,PAD.16 ; GET PAD.16 VALUE
CAIG T2,177 ;
CAIGE T2,0 ; BETWEEN 0 AND 177?
JRST IPDE.4 ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST IPDE.1 ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST IPDE.X
IPDE.1: CAIE T2,177 ; A RUBOUT?
JRST IPDE.2 ; NO
HRROI T1,[ASCIZ\A RUBOUT\]
CALL .SOUT
JRST IPDE.X
IPDE.2: CAILE T2,37 ; A CONTROL CHARACTER?
JRST IPDE.3 ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
IPDE.3: CALL .BOUT
JRST IPDE.X
IPDE.4: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPDE.X: CALL OCRLF
; HERE TO DISPLAY THE DISCARD-OUTPUT SETTING
IPDIS: MOVE T4,PAD.8
CALL WHOSET
HRROI T1,[ASCIZ\DISCARD-OUTPUT (is) \]
CALL .SOUT
HRRZ T2,PAD.8 ; GET PAD.8 VALUE
CAIE T2,0 ; DISABLED?
JRST IPDI.1 ; NO
HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
JRST IPDI.X
IPDI.1: CAIE T2,1 ; ENABLED?
JRST IPDI.2 ; NO
HRROI T1,[ASCIZ\ENABLED\]
CALL .SOUT
JRST IPDI.X
IPDI.2: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPDI.X: CALL OCRLF
; HERE TO DISPLAY THE DISPLAY-CHARACTER SETTING
IPDCH: MOVE T4,PAD.18
CALL WHOSET
HRROI T1,[ASCIZ\DISPLAY-CHARACTER \]
CALL .SOUT
HRRZ T2,PAD.18 ; GET PAD.18 VALUE
CAIG T2,177 ;
CAIGE T2,0 ; BETWEEN 0 AND 177?
JRST IPDC.3 ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST IPDC.1 ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST IPDC.X
IPDC.1: CAILE T2,37 ; A CONTROL CHARACTER?
JRST IPDC.2 ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
IPDC.2: CALL .BOUT
JRST IPDC.X
IPDC.3: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPDC.X: CALL OCRLF
; HERE TO DISPLAY THE DTE-TO-NET-FLOW-CONTROL SETTING
IPDNF: MOVE T4,PAD.12
CALL WHOSET
HRROI T1,[ASCIZ\DTE-TO-NET-FLOW-CONTROL (is) \]
CALL .SOUT
HRRZ T2,PAD.12 ; GET PAD.12 VALUE
CAIE T2,0 ; DISABLED?
JRST IPDN.1 ; NO
HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
JRST IPDN.X
IPDN.1: CAIE T2,1 ; ENABLED?
JRST IPDN.2 ; NO
HRROI T1,[ASCIZ\ENABLED\]
CALL .SOUT
JRST IPDN.X
IPDN.2: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPDN.X: CALL OCRLF
; HERE TO DISPLAY THE ECHO SETTING
IPECH: MOVE T4,PAD.2
CALL WHOSET
HRROI T1,[ASCIZ\ECHO (is) \]
CALL .SOUT
HRRZ T2,PAD.2 ; GET PAD.2 VALUE
CAIE T2,1 ; LOCAL ECHO?
JRST IPEC.1 ; NO
HRROI T1,[ASCIZ\DONE LOCALLY\]
CALL .SOUT
JRST IPEC.3
IPEC.1: CAIE T2,0 ; REMOTE ECHO?
JRST IPEC.2 ; NO?!
HRROI T1,[ASCIZ\DONE REMOTELY\]
CALL .SOUT
JRST IPEC.3
IPEC.2: HRROI T1,[ASCIZ\IN AN ILLEGAL STATE\]
CALL .SOUT
IPEC.3: CALL OCRLF
; HERE TO DISPLAY THE ESCAPE-TO-COMMAND-MODE SETTING
IPESC: MOVE T4,PAD.1
CALL WHOSET
HRROI T1,[ASCIZ\ESCAPE-TO-COMMAND-MODE (is) \]
CALL .SOUT
HRRZ T2,PAD.1 ; GET PAD.1 VALUE
CAIE T2,1 ; IS ESCAPE ALLOWED?
JRST IPES.1 ; NO
HRROI T1,[ASCIZ\PERMITTED\] ; YES
CALL .SOUT
JRST IPES.3
IPES.1: CAIE T2,0 ; IS ESCAPE NOT ALLOWED?
JRST IPES.2 ; WHOOPS...ILLEGAL VALUE
HRROI T1,[ASCIZ\PROHIBITED\]
CALL .SOUT
JRST IPES.3
IPES.2: HRROI T1,[ASCIZ\IN AN UNKNOWN STATE\]
CALL .SOUT
IPES.3: CALL OCRLF
; HERE TO DISPLAY THE IDLE-TIMER SETTING
IPITM: MOVE T4,PAD.4
CALL WHOSET
HRROI T1,[ASCIZ\IDLE-TIMER (is) \]
CALL .SOUT
HRRZ T2,PAD.4 ; GET PAD.4 VALUE
CAIE T2,0 ; TEST TO SEE IF IT IS DISABLED
JRST IPIT.1 ; NOT DISABLED
HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
JRST IPIT.X
IPIT.1: CAIG T2,^D255 ;
CAIGE T2,1 ; BETWEEN 1 AND ^D255?
JRST IPIT.3 ; GRUMBLE GRUMBLE
IMULI T2,5
MOVE T3,T2 ; SAVE # OF SECONDS X100
IDIVI T2,^D100 ; DIVIDE DOWN TO SECONDS
MOVE S,T2 ; SAVE WHOLE SECONDS
IMULI T2,^D100
SUB T2,T3 ; GET FRACTION OF A SECOND
MOVE T4,T3 ; SAVE
MOVE T2,S
MOVEI T3,^D10 ; RADIX 10
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
MOVEI T2,"."
CALL .BOUT
CAILE T4,^D10 ; IS FRACTION <.10?
JRST IPIT.2 ; NO, NO NEED FOR LEADING ZERO
MOVEI T2,"0"
CALL .BOUT
IPIT.2: MOVE T2,T4
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
HRROI T1,[ASCIZ\ SECOND\]
CALL .SOUT
HRRZ T2,PAD.4
CAIN T2,^D20 ; EXACTLY ONE SECOND?
JRST IPIT.X ; YES, FINISH LINE
MOVEI T2,"S" ; NO, ADD A "S"
CALL .BOUT
JRST IPIT.X
IPIT.3: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPIT.X: CALL OCRLF
; HERE TO DISPLAY THE LINE-WIDTH SETTING
IPLWD: MOVE T4,PAD.10
CALL WHOSET
HRROI T1,[ASCIZ\LINE-WIDTH (is) \]
CALL .SOUT
HRRZ T2,PAD.10 ; GET PAD.10 VALUE
CAIG T2,^D255 ;
CAIGE T2,0 ; BETWEEN 0 AND ^D255?
JRST IPLW.1 ; HMMMMM, COMPLAIN
MOVEI T3,^D10
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
JRST IPLW.X
IPLW.1: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPLW.X: CALL OCRLF
; HERE TO DISPLAY THE LINEFEED-INSERTION SETTING
IPLIN: MOVE T4,PAD.13
CALL WHOSET
HRROI T1,[ASCIZ\LINEFEED-INSERTION (is done after) \]
CALL .SOUT
HRRZ S,PAD.13 ; GET PAD.13 VALUE
MOVE T3,[-3,,LFITXT] ; SET THE INDEX AND COUNTER
HRROI T4,[ASCIZ\ \] ; BLANK TXT
CALL IPSUB ; GO PRINT SET FUNCTIONS
; HERE TO DISPLAY THE LINEFEED-PADDING SETTING
IPLPD: MOVE T4,PAD.14
CALL WHOSET
HRROI T1,[ASCIZ\LINEFEED-PADDING (is) \]
CALL .SOUT
HRRZ T2,PAD.14 ; GET PAD.14 VALUE
CAIE T2,0 ; PADDING BEING DONE?
JRST IPLP.1 ; YES
HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
JRST IPLP.X
IPLP.1: CAIG T2,7 ;
CAIGE T2,1 ; BETWEEN 1 AND 7?
JRST IPLP.2 ; OUT OF RANGE
ADDI T2,60 ; MAKE IT AN ASCII CHARACTER
CALL .BOUT
HRROI T1,[ASCIZ\ CHARACTER-TIME\]
CALL .SOUT
HRRZ T2,PAD.14 ; GET PAD.14 AGAIN
CAIG T2,1 ; GREATER THAN 1?
JRST IPLP.X ; NO, FINISH THE LINE
MOVEI T2,"S"
CALL .BOUT
JRST IPLP.X
IPLP.2: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPLP.X: CALL OCRLF
; HERE TO DISPLAY THE LOCAL-EDITING SETTING
IPLOC: MOVE T4,PAD.15
CALL WHOSET
HRROI T1,[ASCIZ\LOCAL-EDITING (is) \]
CALL .SOUT
HRRZ T2,PAD.15 ; GET PAD.15 VALUE
CAIE T2,0 ; DISABLED?
JRST IPLO.1 ; NO
HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
JRST IPLO.X
IPLO.1: CAIE T2,1 ; ENABLED
JRST IPLO.2 ; NO
HRROI T1,[ASCIZ\ENABLED\]
CALL .SOUT
JRST IPLO.X
IPLO.2: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPLO.X: CALL OCRLF
; HERE TO DISPLAY THE NET-TO-DTE-FLOW-CONTROL SETTING
IPNDF: MOVE T4,PAD.5
CALL WHOSET
HRROI T1,[ASCIZ\NET-TO-DTE-FLOW-CONTROL (is) \]
CALL .SOUT
HRRZ T2,PAD.5 ; GET PAD.5 VALUE
CAIE T2,0 ; DISABLED?
JRST IPND.1 ; NO
HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
JRST IPND.X
IPND.1: CAIE T2,1 ; ENABLED?
JRST IPND.2 ; NO
HRROI T1,[ASCIZ\ENABLED\]
CALL .SOUT
JRST IPND.X
IPND.2: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPND.X: CALL OCRLF
; HERE TO DISPLAY THE PAD-SIGNAL-CONTROL SETTING
IPNMD: MOVE T4,PAD.6
CALL WHOSET
HRROI T1,[ASCIZ\PAD-SIGNAL-CONTROL (is) \]
CALL .SOUT
HRRZ T2,PAD.6 ; GET PAD.6 VALUE
CAIE T2,0 ; SUPPRESSED?
JRST IPNM.1 ; NO
HRROI T1,[ASCIZ\SUPPRESSED\]
CALL .SOUT
JRST IPNM.X
IPNM.1: CAIE T2,1 ; ENABLED?
JRST IPNM.2 ; NO
HRROI T1,[ASCIZ\ENABLED\]
CALL .SOUT
JRST IPNM.X
IPNM.2: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPNM.X: CALL OCRLF
; HERE TO DISPLAY THE RATE SETTING
IPRAT: MOVE T4,PAD.11
CALL WHOSET
HRROI T1,[ASCIZ\RATE (is) \]
CALL .SOUT
HRRZ T2,PAD.11 ; GET PAD.11 VALUE
CAIE T2,0 ; 110 BAUD?
JRST IPR.01 ; NO
HRROI T1,[ASCIZ\110 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.01: CAIE T2,1 ; 134.5 BAUD?
JRST IPR.02 ; NO
HRROI T1,[ASCIZ\134.5 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.02: CAIE T2,2 ; 300 BAUD?
JRST IPR.03 ; NO
HRROI T1,[ASCIZ\300 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.03: CAIE T2,3 ; 1200 BAUD?
JRST IPR.04 ; NO
HRROI T1,[ASCIZ\1200 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.04: CAIE T2,4 ; 600 BAUD?
JRST IPR.05 ; NO
HRROI T1,[ASCIZ\600 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.05: CAIE T2,5 ; 75 BAUD?
JRST IPR.06 ; NO
HRROI T1,[ASCIZ\75 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.06: CAIE T2,6 ; 150 BAUD?
JRST IPR.07 ; NO
HRROI T1,[ASCIZ\150 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.07: CAIE T2,7 ; 1800 BAUD?
JRST IPR.08 ; NO
HRROI T1,[ASCIZ\1800 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.08: CAIE T2,^D8 ; 200 BAUD?
JRST IPR.09 ; NO
HRROI T1,[ASCIZ\200 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.09: CAIE T2,^D9 ; 100 BAUD?
JRST IPR.10 ; NO
HRROI T1,[ASCIZ\100 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.10: CAIE T2,^D10 ; 50 BAUD?
JRST IPR.11 ; NO
HRROI T1,[ASCIZ\50 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.11: CAIE T2,^D11 ; 75/1200 BAUD?
JRST IPR.12 ; NO
HRROI T1,[ASCIZ\75/1200 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.12: CAIE T2,^D12 ; 2400 BAUD?
JRST IPR.13 ; NO
HRROI T1,[ASCIZ\2400 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.13: CAIE T2,^D13 ; 4800 BAUD?
JRST IPR.14 ; NO
HRROI T1,[ASCIZ\4800 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.14: CAIE T2,^D14 ; 9600 BAUD?
JRST IPR.15 ; NO
HRROI T1,[ASCIZ\9600 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.15: CAIE T2,^D15 ; 19200 BAUD?
JRST IPR.16 ; NO
HRROI T1,[ASCIZ\19200 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.16: CAIE T2,^D16 ; 48000 BAUD?
JRST IPR.17 ; NO
HRROI T1,[ASCIZ\48000 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.17: CAIE T2,^D17 ; 56000 BAUD?
JRST IPR.18 ; NO
HRROI T1,[ASCIZ\56000 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.18: CAIE T2,^D18 ; 64000 BAUD?
JRST IPR.19 ; NO
HRROI T1,[ASCIZ\64000 BAUD\]
CALL .SOUT
JRST IPRA.X
IPR.19: HRROI T1,[ASCIZ\AN ILLEGAL VALUE\]
CALL .SOUT
IPRA.X: CALL OCRLF
; HERE TO FINISH THE INFORMATION (ON) PAD-PARAMETERS COMMAND
HRROI T1,[ASCIZ\
( * Indicates PAD Parameters which were set by the remote host )
\]
CALL .SOUT
RET ; END INFORMATION ON PAD-PARAMETERS
; MISC. ROUTINES
;ROUTINE TO PRINT ACTION ON BREAK AND DATA FORWARDING PARAMS
IPSUB:
HLRZ T2,(T3) ; GET THE MASK
TDZN S,T2 ; IS THIS BIT SET
AOBJN T3,IPSUB ; NO, TRY NEXT IF NOT DONE
HRRO T1,(T3) ; GET THE TYPE MESSAGE
CALL .SOUTR
JUMPE S,IPSUBE ; AND RET IF NO MORE SET
AOBJP T3,IPSUBE ; INCREMENT INDEX, SHOULD NEVER JUMP
IPSUB1: HLRZ T2,(T3) ; GET THE MASK
TDZN S,T2 ; IS THIS BIT SET
AOBJN T3,IPSUB1 ; NO, GET NEXT IF NOT ALL
MOVE T1,T4 ; GET THE BLANK TEXT
CALL .SOUT
HRRO T1,(T3) ; GET THE TYPE MESSAGE
CALL .SOUTR
SKIPE S ; AND RET IF NO MORE SET
AOBJN T3,IPSUB1 ; GET NEXT, SHOULD ALWAYS JUMP
IPSUBE: RET
DFWTXT: P03%AL,,[ASCIZ\ALPHANUMERICS\]
P03%CR,,[ASCIZ\CARRIAGE-RETURN\]
P03%CT,,[ASCIZ\CONTROL-CHARACTERS\]
P03%ED,,[ASCIZ\EDITING-CHARACTERS\]
P03%ES,,[ASCIZ\ESCAPE-CHARACTERS\]
P03%FM,,[ASCIZ\FORMS-CONTROL-CHARACTERS\]
P03%TR,,[ASCIZ\TERMINATOR-CHARACTERS\]
P03%OT,,[ASCIZ\OTHER CHARACTERS\]
-1,,[ASCIZ\UNKNOWN CODE\]
[ASCIZ\NO-SIGNAL\]
ABRTXT: P07%ES,,[ASCIZ\ESCAPE\]
P07%DO,,[ASCIZ\DISCARD-OUTPUT\]
P07%IT,,[ASCIZ\INTERRUPT\]
P07%ID,,[ASCIZ\INDICATE\]
P07%RE,,[ASCIZ\RESET\]
-1,,[ASCIZ\IN AN ILLEGAL STATE\]
[ASCIZ\NOTHING\]
LFITXT: P13%EC,,[ASCIZ\ECHOED CARRIAGE-RETURNS\]
P13%FD,,[ASCIZ\RECEIVED CARRIAGE-RETURNS\]
P13%TD,,[ASCIZ\SENT CARRIAGE-RETURNS\]
; -1,,[ASCIZ\IN AN ILLEGAL STATE\]
0,,[ASCIZ\NO CARRIAGE-RETURNS\]
; CALLED TO PRINT A * IF THE PAD PARAMETER IN T4 HAS PF%WRT SET
; OR A "SPACE" IF THE PAD PARAMETER IN T4 HAS PF%WRT CLEARED
WHOSET:
MOVEI T2," " ; ASSUME PARAMETER LAST SET LOCALLY
TXNE T4,PF%WRT ; SET BY REMOTE?
MOVEI T2,"*" ; YES, MOVE IN A *
CALL .BOUT
RET
; HERE TO DISPLAY DEFAULT INFORMATION
.IDEF: NOISE (for)
MOVEI T2,[FLDDB. .CMKEY,,IDFTAB] ; POINT TO TABLE
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T2,(T2) ; GET THE COMMAND DISPATCH
JRST (T2) ; GO...
.IDLOG: CONFIRM
HRROI T1,[ASCIZ\ SET DEFAULT LOG APPEND\]
SKIPGE .LJBLK ; ARE WE DEFAULT APPEND
HRROI T1,[ASCIZ\ SET DEFAULT LOG SUPERSEDE\] ; NO
CALL .SOUTR
HRROI T1,[ASCIZ\ SET DEFAULT LOG \]
CALL .SOUT
HRROI T1,[ASCIZ\NO \]
SKIPN L.SUPP ; ARE WE STRIPPING NULLS
CALL .SOUT ; NO
HRROI T1,[ASCIZ\SUPPRESS\]
CALLRE .SOUTR
.IDTAK: CONFIRM
HRROI T1,[ASCIZ\ SET DEFAULT TAKE \] ; PRINT HEADER
CALL .SOUT
HRROI T1,[ASCIZ\NO \] ; SET UP FOR NO
SKIPN .DECHO ; IS DEFAULT ECHO SET
CALL .SOUT ; NO, PRINT "NO"
HRROI T1,[ASCIZ\ECHO (COMMAND FROM "TAKE" FILE)\] ; PRINT TRAILER
CALL .SOUTR ; PRINT IT WITH CRLF
HRROI T1,[ASCIZ\ SET DEFAULT TAKE \] ; PRINT HEADER
CALL .SOUT
HRROI T1,[ASCIZ\ALLOW \] ; ASS_U_ME HES ALLOWING ERRORS
SKIPN .DERRE ; IS HE
HRROI T1,[ASCIZ\DISALLOW \] ; NO
CALL .SOUT
HRROI T1,[ASCIZ\(ERRORS DURING "TAKE" FILE)\] ; PRINT TRAILER
CALL .SOUTR ; PRINT IT AND CRLF
RET
IDFTAB: IDFTBL,,IDFTBL
TBL (LOG,,.IDLOG)
TBL (TAKE,,.IDTAK)
IDFTBL==<.-IDFTAB>-1
; HERE TO DISPLAY REMOTE-HOST INFORMATION
.IREMH:
CONFIRM
HLRZ P1,DTETAB ; GET THE NUMBER OF ENTRIES IN THE TABLE
JUMPE P1,.IREM3 ; JUST RETURN IF EMPTY
MOVEI P2,1 ; SET UP INDEX
.IREM1: HLLZ T1,DTETAB(P2) ; GET POINTER TO FIRST BLOCK
HRRI T1,DTENAM ; SET UP FOR A BLT
BLT T1,DTESUB+3 ; FROM TABLE TO HOLDING BUFFER
HRROI T1,[ASCIZ\ \]
CALL .SOUT
HRROI T1,DTENAM ; POINT TO THE REMOTE-HOST NAME
CALL .SOUT ; PRINT IT
HRROI T1,[ASCIZ\ => \] ;
CALL .SOUT
HRROI T1,DTEADR ; POINT TO THE ADDRESS STRING
CALL .SOUT
MOVE T1,[POINT 7,DTESUB,6] ; POINT AT FIRST CHARACTER IN SUBADDRESS
LDB T1,T1 ; GET IT
JUMPE T1,.IREM2 ; JUMP IF NO SUBADDRESS
HRROI T1,[ASCIZ\ (\]
CALL .SOUT
HRROI T1,DTESUB ; POINT AT SUBADDRESS STRING
CALL .SOUT
HRROI T1,[ASCIZ\)\]
CALL .SOUT
.IREM2: CALL OCRLF ; FINISH UP LINE
AOS P2 ; INCREMENT INDEX INTO DTETAB
SOJG P1,.IREM1 ; DECREMENT COUNT AND JUMP IF MORE
.IREM3: CALL OCRLF ; ADD AN EXTRA CR/LF
RET ; AND RETURN
; HERE TO DISPLAY VERSION INFORMATION
.IVERS:
NOISE (of program)
CONFIRM
.IVERH: HRROI T1,[ASCIZ\ This is X29PAD version \]
CALL .SOUT
MOVEI T3,^D8 ; RADIX 8
LDB T2,[POINT 9,VERSIO,11] ; MAJOR VERSION
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
LDB T2,[POINT 6,VERSIO,17] ; MINOR VERSION
JUMPE T2,.IVER0 ; IF NO MINOR VERSION SKIP TO EDIT
MOVEI T2,"."
CALL .BOUT
LDB T2,[POINT 6,VERSIO,17] ; MINOR VERSION
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
.IVER0: MOVEI T2,"("
CALL .BOUT
HRRZ T2,VERSIO ; EDIT NUMBER
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
MOVEI T2,")"
CALL .BOUT
LDB T2,[POINT 3,VERSIO,2] ; WHO EDITED LAST
JUMPE T2,.IVER1 ; ZERO, SO JUST FINISH OFF LINE
MOVEI T2,"-"
CALL .BOUT
LDB T2,[POINT 3,VERSIO,2] ; GET LAST EDITOR AGAIN
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
.IVER1: HRROI T1,CRLF
CALL .SOUT
HRROI T1,[ASCIZ\ Gateway Access Library version is \]
CALL .SOUT
MOVEI T3,^D8 ; RADIX 8
LDB T2,[POINT 8,E.VERS##,7] ; MAJOR VERSION
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
MOVEI T2,"("
CALL .BOUT
LDB T2,[POINT 8,E.VERS,15] ; EDIT NUMBER
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
MOVEI T2,")"
CALL .BOUT
LDB T2,[POINT 8,E.VERS,23] ; WHO EDITED LAST
JUMPE T2,.IVER3 ; ZERO, SO JUST FINISH OFF LINE
MOVEI T2,"-"
CALL .BOUT
LDB T2,[POINT 8,E.VERS,23] ; GET LAST EDITOR AGAIN
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
.IVER3: HRROI T1,CRLF
CALL .SOUT
RET
; HERE TO GIVE INFORMATION ON THE LAST NETWORK ERROR
.INETE:
CONFIRM
MOVE P1,LASTNE ; GET THE LAST NETWORK ERROR
CALL NETINF ; DISPLAY INFO AVAILABLE ON IT
CALL OCRLF
RET
; HERE TO DISPLAY STATUS OF X29PAD
.ISTAT:
NOISE (of X29PAD)
CONFIRM
HRROI T1,[ASCIZ\ NETWORK NAME (is) \]
CALL .SOUT
MOVE P1,[POINT 7,NETNAM,6]
LDB P2,P1
JUMPE P2,.ISTA1 ; IF ZERO THEN THE NAME HASN'T BEEN SET
HRROI T1,NETNAM ; NETWORK NAME HAS BEEN SET
CALL .SOUT ; SO PRINT IT
JRST .ISTA2 ; AND GO ON TO OTHER THINGS
.ISTA1: HRROI T1,[ASCIZ\unknown\]
CALL .SOUT
.ISTA2: CALL OCRLF
HRROI T1,[ASCIZ\ NETWORK PASSWORD (is) \]
CALL .SOUT
MOVEI T1,.FHSLF ; CURRENT PROCESS
RPCAP ; GET CAPABILITIES
TXNE T3,SC%WHL!SC%OPR!SC%MNT ; SHOULD WE PRINT THE PASSWORD?
JRST .ISTA3 ; YES, GO TRY TO PRINT IT
HRROI T1,[ASCIZ\not available\]
CALL .SOUT
JRST .ISTA5 ; CONTINUE ON
.ISTA3: MOVE P1,[POINT 7,NETPSW,6]
LDB P2,P1 ; GET THE FIRST BYTE OF THE PASSWORD
JUMPE P2,.ISTA4 ; IF ZERO THEN PASSWORD HASN'T BEEN SET
HRROI T1,NETPSW ; POINT TO THE PASSWORD
CALL .SOUT ; AND PRINT IT
JRST .ISTA5 ; AND GO ON TO OTHER THINGS
.ISTA4: HRROI T1,[ASCIZ\unknown\]
CALL .SOUT
.ISTA5: CALL OCRLF
HRROI T1,[ASCIZ\ BREAK-CHARACTER (is) \]
CALL .SOUT
MOVE T2,BRKCHR ; GET BREAK CHARACTER
CAIG T2,177 ;
CAIGE T2,1 ; BETWEEN 1 AND 177?
JRST .IST08 ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST .IST06 ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST .IST0X
.IST06: CAILE T2,37 ; A CONTROL CHARACTER?
JRST .IST07 ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
.IST07: CALL .BOUT
JRST .IST0X
.IST08: HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
.IST0X: CALL OCRLF ; FINISH LINE
HRROI T1,[ASCIZ\ ESCAPE-CHARACTER (is) \]
CALL .SOUT
MOVE T2,ESCCHR ; GET ESCAPE CHARACTER
CAIG T2,177 ;
CAIGE T2,1 ; BETWEEN 1 AND 177?
JRST .ISTA8 ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST .ISTA6 ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST .ISTAX
.ISTA6: CAILE T2,37 ; A CONTROL CHARACTER?
JRST .ISTA7 ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
.ISTA7: CALL .BOUT
JRST .ISTAX
.ISTA8: HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
.ISTAX: CALL OCRLF ; FINISH LINE
HRROI T1,[ASCIZ\ STATUS-DISPLAY-CHARACTER (is) \]
CALL .SOUT
MOVE T2,STSCHR ; GET STATUS-DISPLAY-CHARACTER
CAIG T2,177 ;
CAIGE T2,1 ; BETWEEN 1 AND 177?
JRST .ISTB3 ; NO, SIGH
CAIE T2,40 ; A SPACE?
JRST .ISTB1 ; NO
HRROI T1,[ASCIZ\A SPACE\]
CALL .SOUT
JRST .ISTBX
.ISTB1: CAILE T2,37 ; A CONTROL CHARACTER?
JRST .ISTB2 ; NO
HRROI T1,[ASCIZ\CONTROL-\]
CALL .SOUT
ADDI T2,100 ; CONVERT TO A PRINTABLE CHARACTER
.ISTB2: CALL .BOUT
JRST .ISTBX
.ISTB3: HRROI T1,[ASCIZ\DISABLED\]
CALL .SOUT
.ISTBX: CALL OCRLF ; FINISH LINE
HRROI T1,[ASCIZ\ Transmitted: \]
CALL .SOUT
MOVE T2,XMTPKT ; GET THE NUMBER OF PACKETS TRANSMITTED
MOVEI T3,^D10 ; IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ packets, \]
CALL .SOUT
MOVE T2,XMTCHR ; GET THE NUMBER OF CHARACTERS XMTD
MOVEI T3,^D10 ; IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ characters\]
CALL .SOUTR
HRROI T1,[ASCIZ\ Received: \]
CALL .SOUT
MOVE T2,RCVPKT ; GET THE NUMBER OF PACKETS TRANSMITTED
MOVEI T3,^D10 ; IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ packets, \]
CALL .SOUT
MOVE T2,RCVCHR ; GET THE NUMBER OF CHARACTERS XMTD
MOVEI T3,^D10 ; IN DECIMAL
CALL .NOUT
CALL ERROR
HRROI T1,[ASCIZ\ characters\]
CALL .SOUTR
RET
; OTHER THINGS TO DISPLAY:
; CONNECTION STATUS
; SESSION START-TIME (IF CONNECTED)
; DTE NUMBER CALLED (IF CONNECTED)
; LOGGING ENABLED/DISABLED
;
SUBTTL LOG COMMAND
.LOG:
NOISE (output to file)
MOVE T2,[.LJBLK,,GTJBLK] ; BLT POINTER
BLT T2,GTJBLK+.GJJFN ; PUT OUR STUF IN GET JFN BLOCK
MOVEI T2,[FLDDB. .CMFIL,CM%SDH,,<log file spec>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
MOVEM T2,LJFN ; SAVE JFN
CONFIRM
SKIPN T1,LOGJFN ; GET OLD LOGJFN
JRST GETLOG ; IF NO LOGJFN START NEW LOG
SETZM LOGJFN ; CLEAR LOG JFN
CLOSF ; CLOSE OLD ONE
JRST FATAL ; FATAL ERROR
GETLOG:
HRRZ T1,LJFN ; GET JFN
MOVE T2,[FLD(7,OF%BSZ)!OF%APP!OF%RTD] ; APPEND FLAGS
OPENF
CALLRE NOLOG. ; FAILURE
MOVEM T1,LOGJFN ; SAVE IT
CALLRE L.SAVE
NOLOG.:
HRROI T1,[ASCIZ/COULDN'T OPEN LOG FILE/]
CALLRE .SOUTR
LOG: PUSH P,T1 ; SAVE T1
PUSH P,T2 ; SAVE T2
PUSH P,T3 ; SAVE T3
MOVE T1,LOGJFN ; GET LOG JFN
MOVE T2,CMDBLK+2 ; GET PROMT POINTER
SETZ T3,
SOUT
MOVE T2,CMDBLK+3 ; GET INPUT STRING
SOUT
HLL T2,CMDBLK+3 ; MAKE LEFT SIDE OF POINTERS THE SAME
SUB T2,CMDBLK+3 ; GET LOCATIONS
MOVM T2,T2 ; MAKE POSITIVE
ADDI T2,2 ; GIVE IT 2 EXTRA
IMULI T2,5 ; FIVE BYTES PER WORD
ADDM T2,L.CNT ; UPDATE COUNT
POP P,T3 ; RESTORE T3
SKIPL L.CNT ; TIME TO UPDATE?
CALLRE L.SAV1 ; YES, GO UPDATE LOG
POP P,T2 ; RESTORE T2
POP P,T1 ; RESTORE T1
RET
L.SAVE: PUSH P,T1 ; SAVE T1
PUSH P,T2 ; SAVE T2
L.SAV1: MOVX T1,CO%NRJ
HRR T1,LOGJFN ; GET JFN
CLOSF ; CLOSE IT
JRST FATAL ; SHOULD NEVER HAPPEN
HRRZ T1,T1 ; CLEAR LEFT HALF OF T1
MOVE T2,[FLD(7,OF%BSZ)!OF%APP!OF%RTD] ; OPENF BITS
OPENF
JRST FATAL ; SHOULD NEVER HAPPEN
HRROI T1,-L.CNT% ; UPDATE COUNTER
MOVEM T1,L.CNT
POP P,T2 ; RESTORE T2
POP P,T1 ; RESTORE T1
RET
L.SUPP: 0 ;SUPERSEDE FLAG
L.CNT: 0 ;CHARACTER COUNT
LOGJFN: 0 ;JFN OF LOG FILE
LJFN: 0 ;TEMP STORAGE OF APPEND AND LOG JFN
.LJBLK: 0
0
0
0
0
440700,,[ASCIZ\LOG\]
0
0
0
SUBTTL PUSH COMMAND
.PUSH:
NOISE (command level)
CONFIRM
MOVE T1,FKHAN ; GET THE EXEC'S FORK HANDLE
SKIPN T1 ; HAVE WE ALREADY MAPPED AN EXEC?
JRST .PUSH1 ; NO
HLL T1,[ SF%CON ] ; YES, JUST CONTINUE IT
SFORK
WFORK
ERCAL FATAL
RET
.PUSH1: MOVX T1,GJ%OLD!GJ%SHT ; TRY TO GET AN EXEC
HRROI T2,[ASCIZ\SYSTEM:EXEC.EXE\]
GTJFN
ERJMP ERROR
MOVEM T1,EXCJFN ; SAVE THE JFN WE GOT FOR THE EXEC
MOVX T1,CR%CAP ; MAKE A FORK, GIVE IT OUR CAPABILITIES
CFORK ; CREATE A FORK
ERJMP ERROR
MOVEM T1,FKHAN ; SAVE THE FORK HANDLE
HRL T1,EXCJFN ; FORM JFN,,FORK HANDLE
MOVS T1,T1 ; GET WANTS TO SEE FORK HANDLE,,JFN
GET ; COPY EXEC.EXE INTO INFERIOR FORK
ERCAL FATAL
MOVE T1,FKHAN ; GET THE FORK HANDLE BACK
SETZ T2, ; START AT OFFSET 0 IN ENTRY VECTOR
SFRKV ; START THE FORK
ERCAL FATAL
WFORK ; WAIT FOR IT TO COMPLETE
ERCAL FATAL
RET
SUBTTL RESET COMMAND
SUBTTL SET COMMAND
.SET:
MOVEI T2,[FLDDB. .CMKEY,,SETTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP ; DID THE PARSE FAIL?
JRST ERROR ; YES
HRRZ T2,(T2) ; GET THE DISPATCH ADDRESS
JRST (T2) ; AND GO DO IT
; KEYWORD TABLE FOR THE SET COMMAND
SETTAB: SETTBL,,SETTBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRIES
TBL (BREAK-CHARACTER,,.BRKCH)
TBL (DEFAULT,,.DEF)
TBL (ESCAPE-CHARACTER,,.ESCAP)
TBL (NETWORK,,.NETWO)
TBL (PAD-PARAMETER,,.PADPR)
TBL (STATUS-DISPLAY-CHARACTER,,.STATU)
SETTBL==<.-SETTAB>-1
; HERE TO SET THE BREAK-CHARACTER
.BRKCH: MOVEI T2,BRKCHR ; WHERE TO PUT CHARACTER
MOVEM T2,CH.ADR
CALLRE .CHAR ; GO GET CHARACTER
; HERE TO SET THE ESCAPE CHARACTER
.ESCAP: MOVEI T2,ESCCHR ; WHERE TO PUT CHARACTER
MOVEM T2,CH.ADR
CALLRE .CHAR ; GO GET CHARACTER
; HERE TO SET NETWORK PARAMETERS
.NETWO:
MOVEI T2,[FLDDB. .CMKEY,,NETTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T2,(T2)
JRST (T2)
NETTAB: NETTBL,,NETTBL
TBL (NAME,,.NTNAM)
TBL (PASSWORD,,.NTPSW)
NETTBL=<.-NETTAB>-1
; HERE TO SET NETWORK NAME
.NTNAM:
NOISE (to)
MOVEI T2,[FLDDB. .CMFLD,CM%SDH,,<network name (maximum of 16 characters)>]
COMND
ERCAL FATAL
MOVE P1,[POINT 7,ATMBUF,6] ; POINT TO THE FIRST CHARACTER
MOVE P2,[POINT 7,NETNAM,6] ; POINT TO THE DESTINATION
SETZ P3, ; ZERO A CHARACTER COUNTER
LDB P4,P1 ; GET A CHARACTER
.NTNM1: CAIE P4,040 ; A SPACE?
JRST .NTNM2 ; NO, GO ON
ILDB P4,P1 ; GET ANOTHER CHARACTER
JRST .NTNM1 ; AND CHECK FOR ANOTHER LEADING SPACE
.NTNM2: DPB P4,P2 ; STORE IT
AOS P3 ; COUNT IT
.NTNM3: ILDB P4,P1 ; GET A CHARACTER
CAIN P4,0 ; A NUL?
JRST .NTNES ; YES, END OF STRING
IDPB P4,P2 ; DEPOSIT IT
AOS P3 ; COUNT IT
CAIG P3,^D16 ; MORE THAN ^D16 CHARACTERS?
JRST .NTNM3 ; NO, MOVE ANOTHER CHARACTER
HRROI T1,[ASCIZ\?Network name cannot exceed 16 characters\]
CALL .SOUTR
SETZM NETNAM ; FLUSH THE BAD NAME
RET
.NTNES: IDPB P4,P2 ; FINISH OFF STRING
CONFIRM
RET
; HERE TO SET THE NETWORK ACCESS PASSWORD
; NOTE: DO NOT ECHO PASSWORD
.NTPSW:
NOISE (to)
MOVEI T2,[FLDDB. .CMFLD,CM%SDH,,<network access password (maximum of 16 characters)>]
COMND
ERCAL FATAL
MOVE P1,[POINT 7,ATMBUF,6] ; POINT TO THE FIRST CHARACTER
MOVE P2,[POINT 7,NETPSW,6] ; POINT TO THE DESTINATION
SETZ P3, ; ZERO A CHARACTER COUNTER
LDB P4,P1 ; GET A CHARACTER
.NTPW1: CAIE P4,040 ; A SPACE?
JRST .NTPW2 ; NO, GO ON
ILDB P4,P1 ; GET ANOTHER CHARACTER
JRST .NTPW1 ; AND CHECK FOR ANOTHER LEADING SPACE
.NTPW2: DPB P4,P2 ; STORE IT
AOS P3 ; COUNT IT
.NTPW3: ILDB P4,P1 ; GET A CHARACTER
CAIN P4,0 ; A NUL?
JRST .NTPES ; YES, END OF STRING
IDPB P4,P2 ; DEPOSIT IT
AOS P3 ; COUNT IT
CAIG P3,^D16 ; MORE THAN ^D16 CHARACTERS?
JRST .NTPW3 ; NO, MOVE ANOTHER CHARACTER
HRROI T1,[ASCIZ\?Network password cannot exceed 16 characters\]
CALL .SOUTR
SETZM NETPSW ; ZERO OUT BAD PASSWORD
RET
.NTPES: IDPB P4,P2 ; FINISH OFF STRING
CONFIRM
RET
SUBTTL DEFAULT SETUP ROUTINE
.DEF: NOISE (for)
MOVEI T2,[FLDDB. .CMKEY,,DEFTAB] ; POINT TO DEFAULT TABLE
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T2,(T2) ; GET THE COMMAND DISPATCH
JRST (T2) ; GO...
DEFTAB: DEFTBL,,DEFTBL
TBL (LOG,,.DLOG)
TBL (TAKE,,.DTAKE)
DEFTBL==<.-DEFTAB>-1
.DLOG: NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,DLOTAB] ; POINT TO DEF LOG TBL
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
SETOM .DLOSF ; SET THE SET FLAG
HRRZ T2,(T2) ; GET THE DISPATCH
JRST (T2) ; GO DO IT
.DLOAP: NOISE (existing log file!)
CONFIRM
MOVX T2,GJ%MSG ; DONT SPECIFY NEW FILE
MOVEM T2,.LJBLK ; SABE IT IN BLOCK
RET
.DLONO: MOVEI T2,[FLDDB. .CMKEY,,DLNTAB]
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
SETZM .DLOSF ;CLEAR THE SET FLAG
HRRZ T2,(T2) ; GET THE DISPATCH
JRST (T2) ; GO DO IT
.DLOSU: NOISE (null characters in log file!)
CONFIRM
MOVE T2,.DLOSF ; GET THE SET FLAG
MOVEM T2,L.SUPP ; SET OR CLEAR THE SUPPRESS FLAG
RET
.DLONE: NOISE (existing log file!)
CONFIRM
MOVX T2,GJ%FOU!GJ%MSG ; GET JFN TYPE
MOVEM T2,.LJBLK ; SAVE IT
RET
DLNTAB: DLNTBL,,DLNTBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRYS
TBL (SUPPRESS,,.DLOSU)
DLNTBL==<.-DLNTAB>-1 ; NUMBER OF ENTRYS IN THE TABLE
DLOTAB: DLOTBL,,DLOTBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRYS
TBL(APPEND,,.DLOAP)
TBL (NO,,.DLONO)
TBL (SUPERSEDE,,.DLONE)
TBL (SUPPRESS,,.DLOSU)
DLOTBL==<.-DLOTAB>-1 ; NUMBER OF ENTRYS IN THE TABLE
.DLOSF: 0
.DTAKE: NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,DTATAB] ; POINT TO DEF TAKE TBL
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T2,(T2) ; GET THE COMMAND DISPATCH
MOVEI T3,-1 ; SET FALGS
MOVEM T3,.TERRE ; SET ALLOW ERROR FLAG
MOVEM T3,.TECHO ; SET .TECHO FLAG
CALL (T2) ; GO...
MOVE T2,.TECHO ; GET .TECHO
SKIPG T2 ; DID HE SET IT
MOVEM T2,.DECHO ; YES, SAVE DEFAULT
MOVE T2,.TERRE ; GET .TERRE
SKIPG T2 ; DID HE SET IT
MOVEM T2,.DERRE ; YES, SAVE DEFAULT
RET
; DEFAULT TAKE TABLE
DTATAB: DTATBL,,DTATBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRYS
TBL (ALLOW,,.TALOW)
TBL (DISALLOW,,.TDISA)
TBL (ECHO,,.TECO)
TBL (NO,,.TNO)
DTATBL==<.-DTATAB>-1 ; NUMBER OF ENTRYS IN THE TABLE
; HERE TO SET PAD PARAMETERS
.PADPR:
; NOISE (parameter to set)
MOVEI T2,[FLDDB. .CMKEY,,PADTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR
HRRZ T2,(T2)
JRST (T2)
PADTAB: PADTBL,,PADTBL ; ACTUAL,,MAX NUMBER OF ENTRIES
TBL (ACTION-ON-BREAK,,.P.BRK) ; X.3 PAD PARAMETER 7
TBL (CANCEL-CHARACTER,,.P.CAN) ; X.3 PAD PARAMETER 17
TBL (CARRIAGE-RETURN-PADDING,,.P.CRP) ; X.3 PAD PARAMETER 9
TBL (DATA-FORWARDING,,.P.DFW) ; X.3 PAD PARAMETER 3
TBL (DELETE-CHARACTER,,.P.DEL) ; X.3 PAD PARAMETER 16
TBL (DISCARD-OUTPUT,,.P.DIS) ; X.3 PAD PARAMETER 8
TBL (DISPLAY-CHARACTER,,.P.DPY) ; X.3 PAD PARAMETER 18
TBL (DTE-TO-NET-FLOW-CONTROL,,.P.DNF) ; X.3 PAD PARAMETER 12
TBL (ECHO,,.P.ECH) ; X.3 PAD PARAMETER 2
TBL (ESCAPE-TO-COMMAND-MODE,,.P.ESC) ; X.3 PAD PARAMETER 1
TBL (IDLE-TIMER,,.P.TMR) ; X.3 PAD PARAMETER 4
TBL (LINE-WIDTH,,.P.WID) ; X.3 PAD PARAMETER 10
TBL (LINEFEED-INSERTION,,.P.LFI) ; X.3 PAD PARAMETER 13
TBL (LINEFEED-PADDING,,.P.LFP) ; X.3 PAD PARAMETER 14
TBL (LOCAL-EDITING,,.P.LOC) ; X.3 PAD PARAMETER 15
TBL (NET-TO-DTE-FLOW-CONTROL,,.P.NDF) ; X.3 PAD PARAMETER 5
TBL (PAD-SIGNAL-CONTROL,,.P.NMD) ; X.3 PAD PARAMETER 6
TBL (RATE,,.P.RAT) ; X.3 PAD PARAMETER 11
PADTBL==<.-PADTAB>-1
; HERE TO SET THE ECHO PARAMETER
.P.ECH:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,ECHTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR
HRRZ S,(T2) ; GET THE VALUE RETURNED
CONFIRM
TXO S,PF%SET ; PARAMETER WAS SET
MOVEM S,PAD.2 ; AND SET THE PAD PARAMETER
RET
ECHTAB: ECHTBL,,ECHTBL
TBL (LOCAL-ECHO,,1)
TBL (REMOTE-ECHO,,0)
ECHTBL==<.-ECHTAB>-1
; HERE TO SET THE DATA FORWARDING PARAMETER
.P.DFW:
NOISE (on)
MOVE T2,[DFWTAB,,SCRTAB] ; SET UP TABLE
BLT T2,SCRTAB+DFWTBL
MOVEI T4,DFWLGL ; POINT AT LEGAL COMBINATIONS
CALL SCRTCH ; GO GET THE ENTRYS
RET ; ERROR, JUST RETURN
TXO S,PF%SET ; PARAMETER WAS SET
MOVEM S,PAD.3 ; SET THE PAD PARAMETER
RET
DFWTAB: DFWTBL,,DFWTBL
TBL (ALPHANUMERICS,,P03%AL)
TBL (CARRIAGE-RETURN,,P03%CR)
TBL (CONTROL-CHARACTERS,,P03%CT)
TBL (EDITING-CHARACTERS,,P03%ED)
TBL (ESCAPE-CHARACTERS,,P03%ES)
TBL (FORMS-CONTROL-CHARACTERS,,P03%FM)
TBL (NO-SIGNAL,,^D0)
TBL (OTHER-CHARACTERS,,P03%OT)
TBL (TERMINATOR-CHARACTERS,,P03%TR)
DFWTBL==<.-DFWTAB>-1
; TABLE OF LEGAL COMBINATIONS
DFWLGL: DFWLEN
0
P03%CR
P03%CR!P03%ES
P03%CR!P03%TR
P03%CR!P03%ES!P03%ED!P03%TR!P03%FM!P03%CT
DFWLEN==<.-DFWLGL>-1
; HERE TO SET THE ESCAPE FROM DATA TRANSFER MODE PARAMETER
.P.ESC:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,ESCTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ S,(T2) ; GET THE VALUE RETURNED
CONFIRM
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
TXO S,PF%SET
MOVEM S,PAD.1 ; AND SET THE PAD PARAMETER
RET
ESCTAB: ESCTBL,,ESCTBL
TBL (PERMITTED,,1)
TBL (PROHIBITED,,0)
ESCTBL==<.-ESCTAB>-1
; HERE TO SET THE CHARACTER FORWARDING TIMER
.P.TMR:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,TMRTAB,<>,,TMRFLD]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; GET THE ADDRESS OF THE FLD USED
CAIN T3,TMRFLD ; DID WE PARSE A NUMBER?
JRST .P.TM1 ; YES, RESULT IN T2
HRRZ S,(T2) ; NO, GET THE ARGUMENT
JRST .P.TM3 ; AND CONFIRM
.P.TM1:
SETZ S, ; CLEAR S
FMPR T2,[20.] ; MULTIPLY THE NUMBER BY 20.
FIXR S,T2 ; CONVERT IT TO FIXED POINT
JUMPLE S,.FLERR ; IF ITS LESS THAN 1, ERROR
CAILE S,^D255 ; IF ITS GREATER THAN 255., ERROR
JRST .FLERR ; OUT OF RANGE
.P.TM3: CONFIRM
TXO S,PF%SET
MOVEM S,PAD.4 ; AND SET PAD IDLE-TIMER
RET
TMRTAB: TMRTBL,,TMRTBL
TBL (DISABLED,,0)
TMRTBL==<.-TMRTAB>-1
TMRFLD: FLDDB. .CMFLT,CM%SDH,^D10,<an interval from .05 seconds to 12.75 seconds
in .05 second increments>
.FLERR: HRROI T1,[ASCIZ\?Timer must be between .05 and 12.75 seconds\]
CALL .SOUTR
RET
; HERE TO SET CARRIAGE RETURN PADDING
.P.CRP:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,CRPTAB,<>,,CRPFLD]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; GET THE ADDRESS OF THE FLD USED
CAIN T3,CRPFLD ; DID WE PARSE A NUMBER?
JRST .P.CR1 ; YES
HRRZ S,(T2) ; NO, GET THE ARGUMENT
CONFIRM
JRST .P.CR3 ;
.P.CR1: MOVE T4,T2 ; SAVE ARG OVER CONFIRM
CONFIRM
CAIG T4,7 ;
CAIGE T4,1 ; BETWEEN 1 AND 7?
JRST .P.CR2 ; NO, COMPLAIN
MOVE S,T4 ; SET UP ARGUMENT
JRST .P.CR3 ;
.P.CR2: HRROI T1,[ASCIZ\?Argument out of range\]
CALL .SOUT
RET
.P.CR3: TXO S,PF%SET
MOVEM S,PAD.9 ; AND SET THE CARRIAGE-RETURN PADDING
RET
CRPTAB: CRPTBL,,CRPTBL
TBL (DISABLED,,0)
CRPTBL==<.-CRPTAB>-1
CRPFLD: FLDDB. .CMNUM,CM%SDH,^D10,<the desired number of pad characters from 1 to 7>
; HERE TO SET LINEFEED-PADDING
.P.LFP:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,LFPTAB,<>,,LFPFLD]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ T3,T3 ; GET THE ADDRESS OF THE FLD USED
CAIN T3,LFPFLD ; DID WE PARSE A NUMBER?
JRST .P.LP1 ; YES
HRRZ S,(T2) ; NO, GET THE ARGUMENT
CONFIRM
JRST .P.LP3
.P.LP1: MOVE T4,T2 ; SAVE THE ARG OVER THE CONFIRM
CONFIRM
CAIG T4,7 ;
CAIGE T4,1 ; BETWEEN 1 AND 7?
JRST .P.LP2 ; NO, COMPLAIN
MOVE S,T4 ; SET UP ARGUMENT
JRST .P.LP3
.P.LP2: HRROI T1,[ASCIZ\?Argument out of range\]
CALL .SOUT
RET
.P.LP3: TXO S,PF%SET
MOVEM S,PAD.14 ; AND SET THE LINEFEED PADDING PARAMETER
RET
LFPTAB: LFPTBL,,LFPTBL
TBL (DISABLED,,0)
LFPTBL==<.-LFPTAB>-1
LFPFLD: FLDDB. .CMNUM,CM%SDH,^D10,<the desired number of pad characters from 1 to 7>
; HERE TO SET LINE-WIDTH
.P.WID:
NOISE (to)
MOVEI T2,[FLDDB. .CMNUM,CM%SDH,^D10,<a number from 0 to 255>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
MOVE T4,T2 ; SAVE ARG OVER CONFIRM
CONFIRM
CAIG T4,^D255 ;
CAIGE T4,0 ; BETWEEN 0 AND ^D255?
JRST .P.WI1 ; WHOOPS, COMPLAIN
MOVEM T4,PAD.10 ; SET LINE-WIDTH PARAMETER
RET
.P.WI1: HRROI T1,[ASCIZ\?Argument is out of range
\]
CALL .SOUT
RET
; HERE TO SET NET-TO-DTE-FLOW-CONTROL
.P.NDF:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,NDFTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ S,(T2) ; GET THE VALUE RETURNED
CONFIRM
TXO S,PF%SET
MOVEM S,PAD.5 ; AND SET THE PAD PARAMETER
RET
NDFTAB: NDFTBL,,NDFTBL
TBL (DISABLED,,0)
TBL (ENABLED,,1)
NDFTBL==<.-NDFTAB>-1
; HERE TO SET DTE-TO-NETWORK-FLOW-CONTROL
.P.DNF:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,DNFTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ S,(T2)
CONFIRM
TXO S,PF%SET
MOVEM S,PAD.12 ; SET THE PAD PARAMETER
RET
DNFTAB: DNFTBL,,DNFTBL
TBL (DISABLED,,0)
TBL (ENABLED,,1)
DNFTBL==<.-DNFTAB>-1
; HERE TO SET ACTION-ON-BREAK
.P.BRK:
NOISE (to)
MOVE T2,[BRKTAB,,SCRTAB] ; SET UP TABLE
BLT T2,SCRTAB+BRKTBL
MOVEI T4,BRKLGL ; POINT TO THE LEGAL COMBINATIONS
CALL SCRTCH ; GO GET THE ENTRYS
RET ; ERROR, JUST RETURN
TXO S,PF%SET
MOVEM S,PAD.7
RET
BRKTAB: BRKTBL,,BRKTBL
TBL (DISCARD-OUTPUT,,P07%DO)
TBL (ESCAPE,,P07%ES)
TBL (INDICATE,,P07%ID)
TBL (INTERRUPT,,P07%IT)
TBL (NO-ACTION,,0)
TBL (RESET,,P07%RE)
BRKTBL==<.-BRKTAB>-1
; TABLE OF LEGAL COMBINATIONS
BRKLGL: BRKLEN
0
P07%IT
P07%RE
P07%ES
P07%IT!P07%ID!P07%DO
BRKLEN==<.-BRKLGL>-1
; HERE TO SET THE PAD-SIGNAL-CONTROL
.P.NMD:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,NMDTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ S,(T2) ; SAVE ARGUMENT OVER CONFIRM
CONFIRM
TXO S,PF%SET
MOVEM S,PAD.6 ; SET THE PAD PARAMETER
RET
NMDTAB: NMDTBL,,NMDTBL
TBL (ENABLED,,1)
TBL (SUPPRESSED,,0)
NMDTBL=<.-NMDTAB>-1
; HERE TO SET THE DISCARD-OUTPUT PARAMETER
.P.DIS:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,DISTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ S,(T2) ; SAVE THE ARGUMENT ACROSS THE CONFIRM
CONFIRM
TXO S,PF%SET
MOVEM S,PAD.8 ; SET THE PAD PARAMETER
RET
DISTAB: DISTBL,,DISTBL
TBL (DISABLED,,0)
TBL (ENABLED,,1)
DISTBL==<.-DISTAB>-1
; HERE TO SET THE RATE PARAMETER
.P.RAT:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,RATTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ S,(T2) ; SAVE ARGUMENT OVER CONFIRM
CONFIRM
TXO S,PF%SET
MOVEM S,PAD.11
RET
RATTAB: RATTBL,,RATTBL
; TBL (100,,^D9)
TBL (110,,0)
TBL (1200,,3)
; TBL (134.5,,1)
TBL (150,,6)
TBL (1800,,7)
; TBL (19200,,^D15)
TBL (200,,^D8)
TBL (2400,,^D12)
TBL (300,,2)
TBL (4800,,^D13)
; TBL (48000,,^D16)
TBL (50,,^D10)
; TBL (56000,,^D17)
TBL (600,,4)
; TBL (64000,,^D18)
TBL (75,,5)
; TBL (75/1200,,^D11)
TBL (9600,,^D14)
RATTBL==<.-RATTAB>-1
; HERE TO SET THE LINEFEED-INSERTION PARAMETER
.P.LFI:
NOISE (to be done after carriage returns)
MOVE T2,[LFITAB,,SCRTAB] ; SET UP TABLE
BLT T2,SCRTAB+LFITBL
MOVEI T4,LFILGL ; POINT TO THE LEGAL COMBINATIONS
CALL SCRTCH ; GO GET THE ENTRYS
RET ; ERROR, JUST RETURN
TXO S,PF%SET
MOVEM S,PAD.13 ; AND SET THE PAD PARAMETER
RET
LFITAB: LFITBL,,LFITBL
TBL (ECHOED,,P13%EC)
TBL (NEVER,,^D0)
TBL (RECEIVED,,P13%TD)
TBL (SENT,,P13%FD)
LFITBL==<.-LFITAB>-1
; TABLE OF LEGAL COMBINATIONS
LFILGL: LFILEN
0
P13%TD
P13%EC
P13%TD!P13%EC
P13%FD!P13%EC
P13%TD!P13%FD!P13%EC
LFILEN==<.-LFILGL>-1
; HERE TO SET THE LOCAL-EDITING PARAMETER
.P.LOC:
NOISE (to)
MOVEI T2,[FLDDB. .CMKEY,,LOCTAB,<>]
COMND
ERCAL FATAL
TXNE T1,CM%NOP
JRST ERROR
HRRZ S,(T2) ; SAVE ARGUMENT OVER CONFIRM
CONFIRM
TXO S,PF%SET
MOVEM S,PAD.15 ; AND SET THE PAD PARAMETER
RET
LOCTAB: LOCTBL,,LOCTBL
TBL (DISABLED,,0)
TBL (ENABLED,,1)
LOCTBL==<.-LOCTAB>-1
; HERE TO SET THE DELETE-CHARACTER
.P.DEL: MOVEI T2,PAD.16 ; WHERE TO PUT CHARACTER
MOVEM T2,CH.ADR
CALLRE .CHAR ; GO GET CHARACTER
; HERE TO SET THE CANCEL-CHARACTER
.P.CAN: MOVEI T2,PAD.17 ; WHERE TO PUT CHARACTER
MOVEM T2,CH.ADR
CALLRE .CHAR ; GO GET CHARACTER
; HERE TO SET THE DISPLAY-CHARACTER
.P.DPY: MOVEI T2,PAD.18 ; WHERE TO PUT CHARACTER
MOVEM T2,CH.ADR
CALLRE .CHAR ; GO GET CHARACTER
; HERE TO SET THE STATUS-DISPLAY-CHARACTER
.STATU: MOVEI T2,STSCHR ; WHERE TO PUT CHARACTER
MOVEM T2,CH.ADR
CALLRE .CHAR ; GO GET CHARACTER
SUBTTL TAKE COMMAND
.TAKE:
NOISE (commands from)
MOVE T2,[TJBLK1,,GTJBLK] ; BLT POINTER
BLT T2,GTJBLK+.GJJFN ; PUT IT IN GET JFN BLOCK
MOVE T2,CMDBLK+4 ; GET CURRENT BYTE POINTER
MOVEM T2,.TPNT ; SAVE IT
MOVEI T2,.TFD0 ; GET CMMAND FILE
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T3,T3 ; GET FDB USED
CAIE T3,.TFD01 ; INPUT A FILE?
JRST .TAKET ; NO, MUST HAVE BEEN A CONFIRM
MOVEM T2,.TIJFN ; YES, SAVE JFN
MOVE T2,.DECHO ; GET DEFAULT ECHO
MOVEM T2,.TECHO ; SET DEFAULT TEMP ECHO
MOVE T2,.DERRE ; GET DEFAULT ERROR ENABLE
MOVEM T2,.TERRE ; SET DEFAULT TEMP ALLOW ERROR
MOVEI T2,.PRIOU ; GET .PRIOU
MOVEM T2,.TOJFN ; USE .PRIOU FOR DEFAULT OUTPUT
NOISE (logging output on)
MOVE T2,[440700,,.TDEFS] ;GET POINTER TO DEFAULT STRING
.T05$: ILDB T3,.TPNT ; GET FILE
IDPB T3,T2 ; SAVE BYTE
CAIE T3,56 ; A "."?
JUMPN T3,.T05$ ; NO, TRY NEXT IF NOT A NULL
SETZ T3, ; CLEAR T3
DPB T3,T2 ; SAVE NULL BYTE
MOVE T2,[TJBLK2,,GTJBLK] ; BLT POINTER
BLT T2,GTJBLK+.GJJFN ; PUT IT IN GET JFN BLOCK
MOVEI T2,.TFD1 ; POINT TO FDBs
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T3,T3 ; GET FDB USED
CAIN T3,.TFD2 ; DID WE TYPE A COMMA
JRST .T10$ ; YES, INPUT SUBCOMMANDS
CAIE T3,.TFD3 ; NO, DID WE SPECIFY A OUTPUT JFN
JRST .TIDON ; NO, MUST HAVE BEEN A CONFIRM
MOVEM T2,.TOJFN ; SAVE OUTPUT JFN
MOVEI T2,.TFD31 ; POINT TO FDBs
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T3,T3 ; GET FDB USED
CAIE T3,.TFD32 ; WAS IT A ","
JRST .TIDON ; NO, MUST BE A CONFIRM
;HERE FOR ANY TAKE WITH A "," AS LAST CHARACTER
.T10$: CONFIRM
PUSH P,CMDBLK ; SAVE REPARSE ADDRESS
PUSH P,CMDBLK+2 ; SAVE CTRL/R BUFFER
HRROI T2,[ASCIZ\X29PAD-TAKE>\]
MOVEM T2,CMDBLK+2 ; UPDATE COMAND BLOCK
MOVEI T2,.T60$ ; NEW REPARSE BUFFER
MOVEM T2,CMDBLK ; UPDATE COMAND BLOCK
SKIPE .TAKEF ; ARE WE DOING A TAKE
JRST .T20$ ; YES
CALL .T50$ ; GET TAKE SUBCOMMAND
JRST .-1 ; LOOP
;THIS ROUTINE IS FOR PARSING TAKE SUBCOMANDS WHEN WE ARE ALREADY DOING
;A TAKE ie TAKE TAKE
.T20$: SKIPN ERRENA ; ARE ERRORS ENABLED
SKIPN ERRCNT ; CHECK ERROR COUNT
SKIPA ; NO ERRORS, OR ERRORS ARE ALOWED
JUMPA .T40$ ; HE HAD ERROR LETS RESTORE AND RETURN
MOVE T1,INJFN ; POINT TO INPUT JFN
SIBE ; IS THE INPUT BUFFER EMPTY
SKIP ; IGNORE SKIP NO SKIP
JUMPE T2,.T30$ ; NO MORE BYTES,FUDGE CRLF AND CONTINUE
CALL .T50$ ; GO GET LINE
JRST .T20$ ; LOOP
;HERE TO FUDGE A CRLF FOR A TAKE SUBCOMAND OF A TAKE FILE THAT
;RAN OUT OF DATA
.T30$: MOVE T2,CRLF ; GIVE HIM A CARAGE RETURN
MOVEM T2,CMDBUF ; PUT CONFIRM IN COMAND BUF
JRST .T70$ ; CONTINUE ON
;HERE FOR A TAKE FILE THAT HAD A ERROR DOING A TAKE SUBCOMAND WITHOUT ALLOW
;ERRORS ENABLED
.T40$: POP P,CMDBLK+2 ; RESTORE CTRL/R BUFFER
POP P,CMDBLK ; RESTORE REPARSE ADDRESS
RET ; RETURN TO ORIGINAL TAKE ON ERROR
;THIS ROUTINE PARSES A SUBCOMAND FOR THE TAKE
.T50$: MOVEI T1,CMDBLK ; POINT TO CMDBLK
MOVEI T2,[FLDDB. .CMINI] ; INITIALIZE STATE BLOCK
COMND ; CTRL/H, DO OUTPUT PROMPT
ERCAL FATAL ; THIS SHOULD NEVER HAPPEN
MOVEM P,SAVPDL ; SAVE STACK POINTER FOR REPARSE
.T60$: MOVE P,SAVPDL ; RESTORE STACK POINTER FOR REPARSE
MOVEI T2,[FLDDB. .CMCFM,,,,,.TFDS2] ; CONFIRM OR GET SUB COMMAND
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T3,T3 ; GET FDB USED
HRRZ T2,T2 ; CLEAR LEFT OF T2
HRRZ T2,(T2) ; IF SUBCOMMAND GET DISPATCH
CAIN T3,.TFDS2 ; WAS IT A SUBCOMMAND
JRST (T2) ; YES, GO DO IT
POP P,T2 ; WERE NOT RETURNING, POP CALL ADR
.T70$: SKIPE LOGJFN
CALL LOG
SKIPE .TAKEF ; ARE WE IN A TAKE
CALL .TECC ; YES, GO ECHO IF NECESSARY
POP P,CMDBLK+2 ; RESTORE CTRL/R BUEFF
POP P,CMDBLK ; RESTORE REPARSE ADDRESS
JRST .T80$ ; ALL DONE, GO DO IT
;FINISHED PARSING COMANDS SET UP TO DO IT
.TIDON: SKIPE LOGJFN
CALL LOG
SKIPE .TAKEF ; ARE WE ALREADY DOING A TAKE
CALL .TECC ; YES, GO ECHO IF NECESSARY
.T80$: PUSH P,.TPSAV ; SAVE .TPSAV
PUSH P,CMDBLK+1 ; SAVE OLD CMDBLK I/O
PUSH P,ECHOEN ; SAVE ECHO ENA
PUSH P,ERRENA ; SAVE ERROR ENA
PUSH P,INJFN ; SAVE OLD INPUT JFN
PUSH P,OUTJFN ; SAVE OLD OUTPUT JFN
SETZM ERRCNT ; CLEAR ERROR COUNT
AOS .TAKEF ; INCREMENT .TAKEF
MOVE .TECHO ; GET ECHO FLAG
MOVEM ECHOEN ; SAVE NEW ECHO ENA
MOVE .TERRE ; GET ERROR ENA FLAG
MOVEM ERRENA ; SAVE IT
MOVEI T2,.NULIO ; SET NO ECHO
HRL T2,.TIJFN ; GET INPUT JFN
MOVEM T2,CMDBLK+1 ; UPDATE CMDBLK I/O
MOVEM P,.TPSAV ; SAVE P
MOVE T1,.TOJFN ; GET OUTPUT JFN
MOVEM T1,OUTJFN ; SAVE NEW OUTPUT JFN
MOVE T1,.TIJFN ; GET INPUT JFN
MOVEM T1,INJFN ; SAVE NEW INPUT JFN
MOVE T2,[FLD(7,OF%BSZ)!OF%RD] ; ASCII MODE,READ ACCESS
OPENF ; OPEN FILE
JRST .TOERR ; FAILURE, RELESE JFNs AND REPORT
SETZ T2, ; CLEAR T2
SFPTR ; POINT TO BEGINIG OF FILE
; NOT NECESSARY, BUT IF IT DOESN'T
; WORK, ie TTY: , LETS FIND OUT NOW
JRST .TFIN ; MUST BE TTY: OR SOMTHING LIKE IT
MOVE T1,.TOJFN ; GET OUTPUT JFN
CAIN T1,.PRIOU ; ARE WE USING .PRIOU
JRST .TLOOP ; YES, GO ON
MOVE T2,[FLD(7,OF%BSZ)!OF%WR] ; NO, OPEN OUTPUT ASCII/WRITE
OPENF
JRST .TOERR ; ERROR, RESTORE WORLD AND REPORT
;HERE WE LOOP THROUGH THE TAKE FILE
.TLOOP: CALL GETCMD ; GET A COMMAND AND RUN IT
SKIPN ERRENA ; IF ERROR ENA DON'T TEST FOR ERROR
SKIPN ERRCNT ; IF ERROR SKIP
JRST .TLOOP1 ; GO GET NEXT LIN
HRROI T2,[ASCIZ\%Error while reading file \]
SETZ T3, ; CLEAR T3 FOR SOUT
SKIPE T1,LOGJFN ; ARE WE LOGGING
CALL LSOUT
MOVE T1,(P) ; GET OLD OUTPUT JFN
SOUT ; PRINT ERROR MESSAGE
MOVE T2,INJFN ; INPUT THAT FAILED
MOVE T3,[222220,,1] ; SWITCHES
CALL .JFNS ; PRINT FILE NAME
HRROI T2,[ASCIZ\, file aborted.
\] ; PRINT ABORT
SETZ T3, ; CLEAR T3 FOR SOUT
SKIPE T1,LOGJFN ; ARE WE LOGGING
CALL LSOUT
MOVE T1,(P) ; GET OLD OUTPUT JFN
SOUT ; PRINT CRLF
JRST .TRES ; RESTORE THE WORLD
;FILES DONE, LETS FINISH
.TAKET: SKIPN .TAKEF ; ARE WE DOING A TAKE ALREADY
RET ; NO, JUST RETURN
POP P,T2 ; YES, CLEAR RETURN ADRESS
SKIPE LOGJFN
CALL LOG
CALL .TECC ; GO ECHO IF NECESSARY
JRST .TFIN1 ; DON'T PRINT THE EOF MESSAGE
.TFIN: MOVE P,.TPSAV ; RESTORE P INCASE IT WAS EOF TERM
HRROI T2,[ASCIZ\End of \]
SETZ T3, ; CLEAR T3 FOR SOUT
SKIPE T1,LOGJFN ;ARE WE LOGGING?
CALL LSOUT ;YES, GO PRINT IT
MOVE T1,(P) ; GET OLD OUTPUT JFN
SOUT ; PRINT END OF TAKE MESSAGE
MOVE T2,INJFN ; INPUT JFN
MOVE T3,[222220,,1] ; SWITCHES
MOVE T1,(P) ; GET OLD OUTPUT JFN
CALL .JFNS ; PRINT FILE NAME
HRROI T2,CRLF
SETZ T3, ; CLEAR T3 FOR SOUT
SKIPE T1,LOGJFN ;ARE WE LOGGING?
CALL LSOUT ;YES, GO PRINT IT
MOVE T1,(P) ; GET OLD OUTPUT JFN
SOUT ; PRINT CRLF
.TFIN1: SKIPE ERRENA ; ERRORS ENABLED
SETZM ERRCNT ; YES, CLEAR ANY ERRORS
JRST .TRES ; RESTORE THE WORLD
;TAKE SUBCOMAND FOR LOG-FILE
.TOUT: MOVEI T2,.TFD3 ; POINT TO LOG FILE
COMND
ERCAL FATAL ; SHOULD NEVER HAPPEN
SKIP
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES
MOVE T4,T2 ; SAVE JFN
; MOVE T2,GENRIC ; CONFIRM
; COMND
; ERCAL FATAL
; TXNE T1,CM%NOP ; PARSE FAIL?
; JRST ERROR ; YES, REPORT ERROR AND RETURN
CONFIRM
MOVEM T4,.TOJFN ; SAVE NEW JFN
RET
;TAKE SUBCOMMAND FOR "ALLOW"
.TALOW: NOISE (errors during "TAKE" file)
CONFIRM
SETOM .TERRE ; SET ERROR EN FLAG
RET
;TAKE SUBCOMMAND FOR "DISALLOW"
.TDISA: NOISE (errors during "TAKE" file)
CONFIRM
SETZM .TERRE ; CLEAR ERROR ENA FLAG
RET
;TAKE SUBCOMMAND FOR "NO "
.TNO: MOVEI T2,[FLDDB. .CMKEY,,.TNODA] ; POINT TO "NO ECHO"
COMND
ERCAL FATAL ; THIS SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES
NOISE (commands from "TAKE" file)
CONFIRM
SETZM .TECHO ; CLEAR ECHO FLAG
RET
;TAKE SUBCOMMAND FOR "ECHO"
.TECO: NOISE (commands from "TAKE" file)
CONFIRM
SETOM .TECHO ; SET ECHO FLAG
RET
;THIS ROUTINE OUTPUTS THE PARSE BUFFER TO THE LOG FILE IF NECESSARY
.TECC: SKIPN ECHOEN ; IS ECHO ENABLED
RET ; NO,RETURN
PUSH P,T1 ; SAVE T1
PUSH P,T2 ; SAVE T2
PUSH P,T3 ; SAVE T3
MOVE T1,OUTJFN ; GET OUTPUT JFN
MOVE T2,CMDBLK+2 ; GET PROMT POINTER
SETZ T3,
SOUT
MOVE T2,CMDBLK+3 ; GET INPUT STRING
SOUT
POP P,T3 ; RESTORE T3
POP P,T2 ; RESTORE T2
POP P,T1 ; RESTORE T1
RET
;COULDN'T OPEN TAKE FILE OR OUTPUT JFN, REPORT AND ABORT
.TOERR: POP P,OUTJFN ; GET OUTPUT JFN BACK
CALL ERROR ; REPORT ERROR
PUSH P,OUTJFN ; PUT BACK ON STACK
JRST .TRES1 ; RESTORE
;HERE TO RESTORE WORLD AND RETURN
.TRES: MOVE T1,OUTJFN ; GET OUTPUT JFN
CAIE T1,.PRIOU ; IS IT THE .PRIOU
CLOSF ; NO, CLOSE AND RELEASE JFN
SKIP ; IGNORE ERROR RETURN
.TRES1: MOVE T1,INJFN ; GET INPUT JFN
CLOSF ; CLOSE THE JFN
SKIP ; IGNORE ERROR RETURN
POP P,OUTJFN ; RESTORE OUTPUT JFN
POP P,INJFN ; RESTORE INPUT JFN
POP P,ERRENA ; RESTORE .ERREN
POP P,ECHOEN ; RESTORE ECHO ENABLE
POP P,CMDBLK+1 ; RESTORE COMMAND BLOCK
POP P,.TPSAV ; RESTORE .TPSAV
SOS .TAKEF ; DECREMENT TAKE FLAG
RET ; RETURN
TJBLK1: GJ%OLD
0
0
0
0
440700,,[ASCIZ\CMD\]
0
0
0
TJBLK2: GJ%FOU!GJ%MSG!GJ%ACC
0
0
0
440700,,.TDEFS
440700,,[ASCIZ\LOG\]
0
0
0
.TDEFS: BLOCK 10
.TFD0: FLDDB. .CMCFM,CM%SDH,,<Carrage return to end current command level>,,.TFD01
.TFD01: FLDDB. .CMFIL,CM%SDH,,<Command file name>
; JUST CONFIRM OR
.TFD1: FLDDB. .CMCFM,CM%SDH,,<Carriage return if no change of output desired>,,.TFD2
; TRY TO GET A COMMA OR
.TFD2: FLDDB. .CMCMA,CM%SDH,,<Comma for no change, but to enter subcommands>,,.TFD3
; TRY TO GET A OUPUT FILE
.TFD3: FLDDB. .CMFIL,CM%SDH,,<Output file name>
; COMFIRM OR
.TFD31: FLDDB. .CMCFM,,,<Comma to enter subcommands, or>,,.TFD32
.TFD32: FLDDB. .CMCMA,CM%SDH ; GET A COMMA
.TFDS2: FLDDB. .CMKEY,,.TDATA,<Take subcommand,> ; TAKE SUBCOMMAND FDB
.CMFRD: FLDDB. .CMCFM,CM%SDH,
; TAKE SUBCOMMAND TABLE
.TDATA: .TDATL,,.TDATL ; ACTUAL,,MAXIMUM NUMBER OF ENTRYS
TBL (ALLOW,,.TALOW)
TBL (DISALLOW,,.TDISA)
TBL (ECHO,,.TECO)
TBL (LOG-FILE,,.TOUT)
TBL (NO,,.TNO)
.TDATL==<.-.TDATA>-1 ; NUMBER OF ENTRYS IN THE TABLE
; TAKE SUBCOMMAND TABLE FOR "NO"
.TNODA: .TNODL,,.TNODL ; ACTUAL,,MAXIMUM NUMBER OF ENTRYS
TBL (ECHO,,.TNO)
.TNODL==<.-.TNODA>-1 ; NUMBER OF ENTRYS IN THE TABLE
SUBTTL ROUTINE TO TAKE INTITAL COMMAND FILES
TAKER: PUSH P,OUTJFN ; SAVE OUTPUT JFN
MOVEI T1,.NULIO ; GET NUL OUTPUT JFN
MOVEM T1,OUTJFN ; PRINT ALL OUTPUT TO NUL
MOVEM T1,.TOJFN ; DITO
SETZM .TECHO ; DON'T ECHO
SETZM .TERRE ; DON'T ALLOW ERRORS
MOVE T1,[GJ%OLD!GJ%SHT] ; SHORT FORM FOR OLD FILE
HRROI T2,[ASCIZ\SYSTEM:X29PAD-DEFAULTS.INIT
\] ; POINT TO STRING
GTJFN ; GET JFN
JRST TAKERU ; NO FILE, GET USERS INIT
HRRZM T1,.TIJFN ; SAVE INPUT JFN
CALL .T80$ ; GO TAKE STUF
SKIPN ERRCNT ; ANY ERRORS
JRST TAKERU ; NO, GET USERS INIT
CALL ERROR ; REPORT LAST ERROR
HRROI T1,[ASCIZ\%ERROR DURING X29PAD-DEFAULTS.INIT
\]
PSOUT
TAKERU: SETZM ERRCNT ; CLEAR ERROR COUNT
SETO T1, ; POINT TO CURRENT JOB
HRROI T2,CMDBUF ; GET 1 WORD INTO CMDBUF
MOVEI T3,.JILNO ; GET LOGIN DIRECTORY #
GETJI
ERCAL FATAL ; SHOULD NEVER HAPPEN
HRROI T1,CMDBUF ; PUT STRING IN CMDBUF
MOVE T2,CMDBUF ; GET LOGIN DIR #
DIRST ; GET STRING
ERCAL FATAL ; SHOULD NEVER HAPPEN
MOVE T2,[440700,,[ASCIZ\X29PAD.INIT
\]] ; TAKE PS:<DIRECTORY>X29PAD.INIT
TAKERL: ILDB T3,T2 ; GET BYTE
IDPB T3,T1 ; SAVE NEW BYTE
JUMPN T3,TAKERL ; LOOP THRU ALL BYTES
MOVE T1,[GJ%OLD!GJ%SHT] ; SHORT FORM FOR OLD FILE
HRROI T2,CMDBUF ; POINT TO STRING
GTJFN ; GET JFN
JRST TAKERD ; DONE
HRRZM T1,.TIJFN ; SAVE INPUT JFN
CALL .T80$ ; GO TAKE STUF
TAKERD: POP P,OUTJFN ; RESTORE OUTPUT JFN
SKIPN ERRCNT ; ANY ERRORS
RET ; NO, RETURN
CALL ERROR ; REPORT LAST ERROR
HRROI T1,[ASCIZ\%ERROR DURING X29PAD.INIT\]
PSOUT
RET
SUBTTL ERROR HANDLERS AND OTHER ASSORTED STUFF
;ROUTINE TO PARSE A SINGLE CHARACTER AND SAVE IT @CH.ADR
.CHAR: NOISE (to)
MOVEI T2,CHFDB1 ; POINT TO FDB's
COMND
ERCAL FATAL ; THIS SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T3,T3 ; GET FDB USED
CAIE T3,CHFDB1 ; OCTAL NUMBER?
JRST .CHAR2 ; NO, GO ON
JUMPGE T2,.CHAR1 ; IS IT A NEGATIVE NUMBER
MOVEI T1,.FHSLF ; YES, SET ERROR TO SMALL
MOVEI T2,FLINX2
SETER
CALLRE ERROR ; GO GIVE ERROR AND ABORT
.CHAR1: MOVEM T2,CH.CHR ; SAVE THE NUMBER
CAIG T2,177 ; IS IT LARGER THAN 127.
JRST .CHARC ; NO, GO CONFIRN
MOVEI T1,.FHSLF ; SET NUMBER TO LARGE ERROR
MOVEI T2,FLINX3
SETER
CALLRE ERROR
.CHAR2: SETZM CH.CHR ; CLEAR CHARACTER BUFFER
CAIE T3,CHFDB2 ; WAS IT A "CONTROL"
JRST .CHAR3 ; NO, MUST HAVE BEEN DOUBLE QUOTES
MOVEI T2,140 ; MAKE THE BUFFER MASK FOR CONTROL
MOVEM T2,CH.CHR
MOVEI T2,CHFDB3 ; GET THE CHARACTER
COMND
ERCAL FATAL ; THIS SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
.CHAR3: MOVE T2,CMDBLK+.CMABP ; GET BYTE POINTER TO ATOM BUFFER
ILDB T3,T2 ; GET THE FIRST BYTE
JUMPN T3,.CHAR4 ; ANYTHING?
MOVEI T1,.FHSLF ; ARG BLOCK TO SMALL
MOVEI T2,ARGX04
SETER
CALLRE ERROR
.CHAR4: TDZ T3,CH.CHR ; IF CONTROL, MAKE IT SO
MOVEM T3,CH.CHR ; SAVE CHARACTER
ILDB T3,T2 ; GET NEXT CHARACTER
JUMPE T3,.CHARC ; SHOULD BE ONLY ONE CHARACTER
MOVEI T1,.FHSLF ; ARG BLOCK TOO LONG
MOVEI T2,ARGX05
SETER
CALLRE ERROR
.CHARC: CONFIRM
MOVE T2,CH.CHR ; GET CHARACTER
MOVEM T2,@CH.ADR ; PUT IT WHERE IT BELONGS
RET
CH.ADR: 0 ; ADDRESS TO STORE CHARACTER AT
CH.CHR: 0 ; TEMP STORAGE OF CHARACTER
CHRTAB: CHRTBL,,CHRTBL ; ACTUAL,,MAXIMUM NUMBER OF ENTRIES
TBL (CONTROL,,.CHAR)
CHRTBL==<.-CHRTAB>-1 ; NUMBER OF ENTRIES IN THE TABLE
CHFDB1: FLDDB. .CMNUM,CM%SDH,10,<octal ASCII code for character>,,CHFDB2
CHFDB2: FLDDB. .CMKEY,,CHRTAB,,,CHFDB3
CHFDB3: FLDDB. .CMQST,CM%SDH,,<any printing character in double quotes>
; THIS ROUTINE IS CALLED WITH P1 LOADED WITH THE ERROR CODE RETURNED
; BY THE GATEWAY ACCESS PACKAGE
; IF NETERR IS CALLED, A SHORT ERROR MESSAGE IS DISPLAYED
; IF NETINF IS CALLED, A LONG MESSAGE IS DISPLAYED
NETINF: SETOM ERRFLG ; SET THE INFO FLAG
NETERR: PUSH P,T1
PUSH P,P1
PUSH P,P2
PUSH P,P3
PUSH P,P4
HRRZI P2,1B18 ;
SETZ P3, ; ZERO COUNTER
NETER1: TDNN P1,P2 ; IS THIS PARTICULAR BIT LIT?
JRST NETER2 ; NO, TRY AGAIN
MOVE P4,P3 ; YES, GET COUNTER
IMULI P4,2 ; CONVERT TO AN INDEX
SKIPE ERRFLG ; LONG OR SHORT ERROR MESSAGE?
AOS P4 ; LONG!
MOVE T1,NETETB(P4) ; GET STRING POINTER FROM TABLE
CALL .SOUT
CALL OCRLF
NETER2: AOS P3 ; INCREMENT COUNTER
LSH P2,-1 ; SHIFT TEST BIT RIGHT ONE PLACE
CAIGE P3,^D18 ; HAVE WE DONE THIS ENOUGH TIMES?
JRST NETER1 ; NO, ONE MORE TIME
SETZM ERRFLG ; CLEAR THE INFO FLAG
POP P,P4
POP P,P3
POP P,P2
POP P,P1
POP P,T1
RET
SCRTCH:
SETZ S, ; INITIALIZE THE DATA
SCRTC1: MOVEI T2,[FLDDB. .CMKEY,,SCRTAB,,,CMCFM]
SKIPA ; DON'T ALLOW CONFIRM
SCRTC2: MOVEI T2,[FLDDB. .CMKEY,,SCRTAB,,,GENRIC]
HLRZ T3,SCRTAB ; GET THE NUMBER OF TABLE ENTRYS
SKIPN T3 ; ANY THING LEFT
SCRTC3: MOVEI T2,GENRIC ; NO, JUST CONFIRM
COMND
ERCAL FATAL ; THIS SHOULD NEVER HAPPEN
TXNE T1,CM%NOP ; DID THE PARSE FAIL
JRST ERROR ; YES, REPORT THE ERROR AND RETURN
HRRZ T3,T3 ; GET FDB USED
CAIN T3,GENRIC ; DID HE JUST TYPE A CRLF
JRST SCRTC7 ; YES, DONE
CAIN T3,CMCFM ; DID HE TYPE A ILLEGAL cr
JRST SCRTC8 ; YES, ILLEGAL COMBINATION
HRRZ T2,T2 ; CLEAR LEFT HALF OF T2
OR S,(T2) ; SET BITS
HRRZ S,S ; CLEAR LEFT HALF OF DATA
PUSH P,T1 ; SAVE T1
MOVEI T1,SCRTAB ; POINT TO THE TABLE
TBDEL ; DELETE THIS ENTRY
ERCAL FATAL ; SHOULD NEVER HAPPEN
MOVE T2,(T4) ; GET THE COUNT OF LEGAL COMBINATIONS
ADD T2,T4 ; MAKE T2 POINT TO ENTRYS IN TABLE
SETZB T3,SCRLGF ; CLEAR T3 AND THE LEGAL FLAG
SCRTC4: HRRZ T1,(T2) ; GET THIS COMBINATION
CAMN S,T1 ; IS THIS AN EXACT MATCH
SETOM SCRLGF ; SET THE EXACT LEGAL FLAG
AND T1,S ; AND THEM
CAMN S,T1 ; ALL BITS SET IN LEGAL COMBINATION
OR T3,(T2) ; INCLUDE THIS AS LEGAL
SOS T2 ; DECREMENT ADDRESS
CAME T2,T4 ; ALL DONE?
JRST SCRTC4 ; NO, GO CHECK NEXT
PUSH P,S ; SAVE S
MOVEI T1,SCRTAB ; POINT TO SCRTAB
HLRZ T2,(T1) ; GET THE NUMBER OF ENTRYS
ADD T2,T1 ; MAKE T2 POINT TO ENTRYS
SCRTC5: CAMN T2,T1 ; CHECKED ALL ENTRYS?
JRST SCRTC6 ; ALL DONE
HRRZ S,(T2) ; GET THIS ENTRY
AND S,T3 ; CHECK IF ITS ALLOWED
SKIPE S ; IS IT ALLOWED?
SOJA T2,SCRTC5 ; YES, TRY NEXT
TBDEL ; DELETE THIS ENTRY
ERCAL FATAL ; SHOULD NEVER HAPPEN
SOJA T2,SCRTC5 ; AND TRY NEXT ENTRY
SCRTC6: POP P,S ; RESTORE S
POP P,T1 ; RESTORE T1
JUMPE S,SCRTC3 ; IF NONE, JUST CONFIRM
SKIPE SCRLGF ; IS THIS A EXACT LEGAL COMBINATION?
JRST SCRTC2 ; YES, ALLOW A CONFIRM
JRST SCRTC1 ; NO, DON'T ALLOW A CONFIRM
SCRTC7: AOS (P) ; SKIP RETURN
RET
SCRTC8: HRROI T1,[ASCIZ\?Illegal combination\]
CALL .SOUTR
MOVE S,CMDBLK ; GET THE FLAGS FOR THE CMDBLK
TXO S,CM%NOP ; SET THE NO-OP FLAG
TXZ S,CM%EOC ; CLEAR THE CONFIRM FLAG
MOVEM S,CMDBLK ; SAVE IT
HRROI T1,-2 ; GET RID OF CRLF
ADJBP T1,CMDBLK+4 ; POINT BEHIND CRLF
MOVEM T1,CMDBLK+4 ; NEW POINTER
RET ; ^H WILL NOW WORK
SCRLGF: 0 ; FLAG SAYING AN EXACT LEGAL MATCH
CMCFM: FLDDB. .CMCFM,CM%SDH
SCRTAB:
DF.BRK==DFWTBL-BRKTBL
DF.LFI==DFWTBL-LFITBL
BRK.LF==BRKTBL-LFITBL
IFGE DF.BRK,<IFGE DF.LFI,<BLOCK DFWTBL+1>>
IFL DF.BRK,<IFGE BRK.LF,<BLOCK BRKTBL+1>>
IFL DF.LFI,<IFL BRK.LF,<BLOCK LFITBL+1>>
; FATAL ERROR ROUTINE
FATAL:
SKIPN .TAKEF ; YES, ARE WE DOING A TAKE
JRST FATAL1 ; NO, ITS REALY FATAL
MOVEI T1,.FHSLF ; SEE WHAT ERROR IT WAS
GETER
HRRZ T2,T2 ; GET RIGHT HALF
CAIE T2,IOX4 ; WAS IT EOF
JRST FATAL1 ; NO, REALLY A FATAL ERROR
MOVEI T1,CMRPRS ; FLAGS AND ADDRESS OF REPARSE ROUTINE
MOVEM T1,CMDBLK ; RESTORE COMAND BLOCK REPARSE
HRROI T1,[ASCIZ\X29PAD>\] ; CTRL/R BUFFER
MOVEM T1,CMDBLK+2 ; UPDATE CTRL/R BUFFER
JRST .TFIN ; GO FINISH TAKE
FATAL1:
SETZM .TAKEF ; CLEAR ALL TAKES
CALL ERROR ; FIRST OUTPUT THE REASON THE JSYS DIED
MOVEI T1,.PRIOU ; RESTORE OUTPUT JFN
MOVEM T1,OUTJFN
HRROI T1,[ASCIZ\, JSYS at PC=\]
CALL .SOUT
POP P,T2 ; GET THE PC BACK FROM THE STACK
SUBI T2,2 ; BACKUP OVER THE ERCAL TO THE JSYS
MOVX T3,NO%MAG!10 ; OUTPUT FREE FORMAT UNSIGNED OCTAL
CALL .NOUT
ERJMP .+1 ; THIS CAN'T HAPPEN
HRROI T1,CRLF
CALL .SOUT
MOVEI T1,.PRIIN ; FLUSH THE INPUT BUFFER
RESET
CFIBF
FATAL0: HALTF ; RETURN TO EXEC SINCE WE'RE CRASHING
HRROI T1,[ASCIZ\?Can't continue\]
CALL .SOUTR
JRST FATAL0 ; DISALLOW CONTINUE COMMAND
; ORDINARY JSYS ERROR ROUTINE
ERROR:
AOS ERRCNT ; INREMENT ERROR COUNT
SKIPN LOGJFN ; ARE WE LOGGING OR
SKIPE .TAKEF ; ARE WE DOING A TAKE
JRST ERRO1 ; SPECIAL CASE
HRROI T1,[ASCIZ\Error: \]
ESOUT
MOVEI T1,.PRIOU ; ERROR MESSAGE TO PRIMARY OUTPUT
HRLOI T2,.FHSLF ; THIS FORK'S LAST ERROR
SETZ T3, ; NO LIMIT
ERSTR
ERJMP .+1 ; SHOULDN'T HAPPEN
ERJMP .+1 ; DITTO
HRROI T1,CRLF
PSOUT
RET
ERRO1: SKIPE LOGJFN ; ARE WE LOGGING
CALL LOG
CALL .TECC ; GO ECHO IF NECESSARY
HRROI T1,[ASCIZ\
?Error: \]
CALL .SOUT
MOVE T1,OUTJFN ; GET OUTPUT JFN
HRLOI T2,.FHSLF ; THIS FORK'S LAST ERROR
SETZ T3, ; NO LIMIT
ERSTR
ERJMP .+1 ; SHOULDN'T HAPPEN
ERJMP .+1 ; DITTO
HRROI T1,CRLF
JRST .SOUT
.SOUTR: CALL .SOUT ; ROUTINE TO PRINT STRING WITH CRLF
OCRLF: HRROI T1,CRLF ; ROUTINE TO TYPE A <CR><LF>
.SOUT: PUSH P,T2 ; SAVE T2
PUSH P,T3 ; SAVE T3
MOVE T2,T1 ; PUT POINTER IN T2
SETZ T3, ; TERMINATE ON A NUL BYTE
SKIPE T1,LOGJFN ; ARE WE LOGING
CALL LSOUT ; GO OUTPUT TO LOG
MOVE T1,OUTJFN ; GET OUTPUT JFN
SOUT
POP P,T3 ; RESTORE T3
MOVE T1,T2 ; PUT UPDATED STRING POINTER IN T1
POP P,T2 ; RESTORE T2
RET
CRLF: ASCIZ\
\
LSOUT:
PUSH P,T2 ; SAVE POINTER
SOUT ; PRINT STRING
HLL T2,(P) ; MAKE LEFT SIDE OF POINTERS THE SAME
SUB T2,(P) ; GET LOCATIONS
MOVM T2,T2 ; MAKE POSITIVE
AOJ T2, ; GIVE IT A EXTRA
IMULI T2,5 ; FIVE BYTES PER WORD
ADDM T2,L.CNT ; UPDATE COUNT
SKIPL L.CNT ; TIME TO UPDATE?
CALL L.SAVE ; YES, GO UPDATE LOG
POP P,T2 ; RESTORE T2
RET
.NOUT:
SKIPN T1,LOGJFN ; ARE WE LOGING
JRST .NOUT1 ; NO, JUST PRINT TO OUTPUT JFN
NOUT ; YES OUTPUT LOG
ERJMP .+1
MOVEI T1,14 ; APROX COUNT
ADDM T1,L.CNT ; UPDATE COUNT
SKIPL L.CNT ; TIME TO UPDATE LOG?
CALL L.SAVE ; YES, DO IT NOW
.NOUT1: MOVE T1,OUTJFN ; GET OUTPUT JFN
NOUT
RET
AOS (P) ; SKIP RETURN
RET
.BOUT:
PUSH P,T1 ; SAVE T1
SKIPN T1,LOGJFN ; ARE WE LOGGING
JRST .BOUT1 ; NO, JUST DO BOUT
BOUT ; YES,OUTPUT IT
AOSL L.CNT ; TIME TO OUTPUT?
CALL L.SAVE ; YES, DO IT NOW
.BOUT1: MOVE T1,OUTJFN ; GET OUTPUT JFN
BOUT ; PRINT STRING
POP P,T1 ; RESTORE T1
RET
.JFNS:
PUSH P,T1 ; SAVE T1
SKIPN T1,LOGJFN ; ARE WE LOGGING
JRST .JFNS1 ; NO, JUST OUTPUT TO OUTPUT JFN
JFNS ; YES, OUTPUT TO LOG FILE
CALL L.SAVE ; UPDATE LOG NOW
.JFNS1: POP P,T1 ; RESTORE OUTPUT JFN
JFNS
RET
REEN: SETOM REENF ; SET REENTER FLAG
JRST START+1
REENF: 0
; ENTRY VECTOR
EVEC: JRST START ; START ENTRY POINT
JRST REEN ; REENTER ENTRY POINT
VERSIO: BYTE (3)VWHO(9)VMAJOR(6)VMINOR(18)VEDIT
EVECL==.-EVEC
END <EVECL,,EVEC>