Trailing-Edge
-
PDP-10 Archives
-
BB-CH18A-BM_1985
-
sna-rje/subsyn.mac
There are no other files named subsyn.mac in the archive.
TITLE SUBSYN SNASUB Command Syntax Table
; ====== ---------------------------
; Copyright (c) 1984, 1985 by
; DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts 01754
;
; 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 thereof may not be provided or otherwise made available to any
; other person. No title to and ownership of the software is hereby
; transferred.
;
; The information 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.
;++
; FACILITY: TOPS-20 Program for submitting files via DECnet/SNA RJE
;
; ABSTRACT: This module defines the syntax of SNASUB commands.
;
; ENVIRONMENT: TOPS-20 Operating Systems, user mode.
;
; AUTHOR: Donald R. Brandt, CREATION DATE: August 15, 1983.
;
; MODIFIED BY:
;
; 01 -
;--
SALL ; Keep listing clean looking
SUBTTL Declarations
SEARCH MONSYM ; Monitor universal symbols
SEARCH MACSYM ; System wide macro definitions
SEARCH GLXMAC ; GALAXY universal definitions
SEARCH ORNMAC ; OPR/ORION universal definitions
SEARCH QSRMAC ; QUASAR universal definitions
SUBTTL Macro Definitions for creating tables
; PRTVAL (symbol, code, keyword)
; Print out symbols, values and keywords
DEFINE PRTVAL (SYM,CODE,KEY), <
PRINTX 'SYM = 'CODE ('KEY)
> ; End of PRTVAL macro definition
; WARNING (symbol, code)
; Print out warning for duplicated symbols with different values
DEFINE WARNING (SYM,VAL,CODE), <
IFDIF <'VAL><'CODE>, <
PRINTX WARNING - 'SYM has been defined as 'VAL, now as 'CODE>
> ; End of WARNING macro definition
; SUBKEY (next-pdb, symbol-suffix, keyword)
; Make user command keyword table entry
..X==0
IF2 <PURGE ..X>
DEFINE SUBKEY (NEXT,CODE,KEYWORD), <
IFNDEF CMD'CODE, <
CMD'CODE==:..X
..X==..X+1
IFN .CLIST, <PRINTX <CMD'CODE = 'KEYWORD>>>
IFB <NEXT>, <KEYTAB (CMD'CODE,KEYWORD)>
IFNB <NEXT>, <DSPTAB (NEXT,CMD'CODE,KEYWORD)>
> ; End of SUBKEY macro definition
; VALKEY (next-pdb, keyword, value, symbol-suffix)
; Make parameter keyword table entry
DEFINE VALKEY (NEXT,CODE,VALUE,KEYWORD), <
IF1 <IFNB <CODE>, <
IFN .CLIST, <PRTVAL (KV'CODE,\<VALUE!1B18>,KEYWORD)>
IFDEF KV'CODE, <WARNING (KV'CODE,\<KV'CODE>,\<VALUE!1B18>)>
IFNDEF KV'CODE, <KV'CODE==:VALUE!1B18>>>
IFB <NEXT>, <KEYTAB (KV'CODE,KEYWORD)>
IFNB <NEXT>, <DSPTAB (NEXT,KV'CODE,KEYWORD)>
> ; End of VALKEY macro definition
; PARKEY (next-pdb, keyword, value, symbol-suffix)
; Make value parameter keyword table entry
DEFINE PARKEY (NEXT,CODE,VALUE,KEYWORD), <
IF1 <IFNB <CODE>, <
IFN .CLIST, <PRTVAL (KY'CODE,VALUE,KEYWORD)>
IFDEF KY'CODE, <WARNING (KY'CODE,\<KY'CODE>,\<VALUE>)>
IFNDEF KY'CODE, <KY'CODE==:VALUE>>>
IFB <NEXT>, <KEYTAB (KY'CODE,KEYWORD)>
IFNB <NEXT>, <DSPTAB (NEXT,KY'CODE,KEYWORD)>
> ; End of PARKEY macro definition
SUBTTL Macro Definitions for Parsing Network File Spec
; NETIFI (next-pdb) - Parse network input file name with optional data in
; the format of node"user account password"::input-file-spec
DEFINE NETIFI (NEXT,NODADR,%A,%B,%C,%D,%E,%F), <
$FIELD (%B,<Node Name for Remote File>,<$FLAGS(CM%SDH+CM%BRK),$BREAK(NODBRK),$PDEFAULT(NODADR),$ALTERNATE(%A)>)
%A: $IFILE (NEXT,<Local File Name>)
%B: $TOKEN (%E,<::>,<$DEFAULT(<::>),$HELP(<"::" To Terminate Node Name>),$ALTERNATE(%C)>)
%C: $QUOTE (%D,<"user password account">)
%D: $TOKEN (%E,<::>,<$DEFAULT(<::>),$HELP(<"::" To Terminate Node Name>)>)
%E: $IFILE (NEXT,<File Name>,<$ALTERNATE(%F)>)
%F: $FIELD (NEXT,<>,<$FLAGS(CM%SDH+CM%BRK),$BREAK(LITBRK)>)
IF2 <PURGE %A,%B,%C,%D,%E,%F>
> ; End of NETIFI macro definition
SUBTTL Macro Definitions for parsing SUBMIT parameters
; SWITCH
; Parse switches
DEFINE SWITCH (%A,%B,%C,%D,%E,%F,%G,%H,%I,%J,%K,%L), <
%A: $SWIDSP (%B,<$ALTERNATE(CONFRM)>)
%B: $STAB
PARKEY (%C,AFT,^D1,<AFTER:>)
; PARKEY (%D,BLG,^D2,<BATCH-LOG:>)
PARKEY (%E,JNM,^D3,<JOBNAME:>)
PARKEY (%A,NTB,^D4,<NOTAB>)
PARKEY (%A,NTR,^D5,<NOTRANSLATE>)
; PARKEY (%F,OUT,^D6,<OUTPUT:>)
PARKEY (%G,PRI,^D7,<PRIORITY:>)
PARKEY (%H,NOD,^D8,<PROCESSING-NODE:>)
PARKEY (%J,REC,^D10,<RECORD:>)
PARKEY (%I,RES,^D9,<RESTARTABLE:>)
PARKEY (%A,TAB,^D11,<TAB>)
PARKEY (%K,TIM,^D12,<TIME:>)
PARKEY (%A,TRN,^D13,<TRANSLATE>)
PARKEY (%L,UNI,^D14,<UNIQUE:>)
$ETAB
%C: AFTER (%A)
%D: BATLOG (%A)
%E: JOBNAM (%A)
%F: OUTPUT (%A)
%G: PRIOR (%A)
%H: PRONOD (%A)
%I: RESTAR (%A)
%J: RECORD (%A)
%K: TIME (%A)
%L: UNIQUE (%A)
IF2 <PURGE %A,%B,%C,%D,%E,%F,%G,%H,%I,%J,%K,%L>
> ;End of SWITCH macro definition
; AFTER
; Parse AFTER switch
DEFINE AFTER (NEXT), <
$TAD (NEXT)
> ;End of AFTER macro definition
; BATLOG
; Parse BATCH-LOG switch
DEFINE BATLOG (NEXT,%A), <
$KEY (NEXT,%A)
%A: $STAB
PARKEY (,APD,%BAPND,<APPEND>)
PARKEY (,SPL,%BSPOL,<SPOOL>)
PARKEY (,SUP,%BSCDE,<SUPERSEDE>)
$ETAB
IF2 <PURGE %A>
> ;End of BATLOG macro definition
; JOBNAME
; Parse JOBNAME switch
DEFINE JOBNAM (NEXT), <
$FIELD (NEXT,<Name of request>)
> ;End of JOBNAM macro definition
; OUTPUT
; Parse OUTPUT switch
DEFINE OUTPUT (NEXT,%A), <
$KEY (NEXT,%A)
%A: $STAB
PARKEY (,LOG,%EQOLG,<ALWAYS>)
PARKEY (,ERR,%EQOLE,<ERRORS>)
PARKEY (,NLG,%EQONL,<NOLOG>)
$ETAB
IF2 <PURGE %A>
> ;End of OUTPUT macro definition
; PRIOR
; Parse PRIORITY SWITCH
DEFINE PRIOR (NEXT), <
$NUMBER (NEXT,^D10,<Decimal priority level>)
> ;End of PRIOR macro definition
; PRONOD
; Parse PROCESSING-NODE switch
DEFINE PRONOD (NEXT), <
$NODNM (NEXT,<SNA-Workstation Name>,<$FLAGS(CM%PO!CM%NSF)>)
> ;End of PRONOD macro definition
; RESTAR
; Parse RESTARTABLE switch
DEFINE RESTAR (NEXT,%A), <
$KEY (NEXT,%A,$DEFAULT(YES))
%A: $STAB
PARKEY (,NO,%EQRNO,<NO>)
PARKEY (,YES,%EQRYE,<YES>)
$ETAB
IF2 <PURGE %A>
> ;End of RESTAR macro definition
; RECORD
; Parse RECORD switch
DEFINE RECORD (NEXT), <
$NUMBER (NEXT,^D10,<Record size in decimal>)
> ;End of RECORD macro definition
; TIME
; Parse TIME switch
DEFINE TIME (NEXT), <
$TIME (NEXT,$DEFAULT(01:00:00))
> ;End of TIME macro definition
; UNIQUE
; Parse UNIQUE switch
DEFINE UNIQUE (NEXT,%A), <
$KEY (NEXT,%A)
%A: $STAB
PARKEY (,ZER,%EQUNO,<0>)
PARKEY (,ONE,%EQUYE,<1>)
PARKEY (,NO,%EQUNO,<NO>)
PARKEY (,YES,%EQUYE,<YES>)
$ETAB
IF2 <PURGE %A>
> ;End of UNIQUE macro definition
SUBTTL Local symbols and storage
IFNDEF .CLIST, <.CLIST==0>
EXP PB$INI
EXP PB$NOD
EXP SUBCMD
SUBTTL Parsing Break Masks
DSTBRK: BRMSK. (EOLB0.,EOLB1.,EOLB2.,EOLB3.,,</>) ; Break set
NODBRK: BRMSK. (FLDB0.,FLDB1.,FLDB2.,FLDB3.,<_>,<->) ; Node name field
; Mask for all printing characters. NOTE: Special handling is required for
; double quote (") and comma (,) characters. Two bits which were shifted left
; 33 and 23 positions in the second field are set to indicate (") and (,),
; respectively.
; BRMSK. calls UNBRK. with double quote as a delimiter which prevents use of
; that character in the string argument to this macro. Since both sets of
; quoting characters are used in the string comma must be specially handled
; lest it would be interpreted as an argument delimeter.
LITBRK: BRMSK. (FLDB0.,<FLDB1.&<^-<1_^D33!1_^D23>>>,FLDB2.,FLDB3.,!#$%&'()*+-.:;<=>?@[\]^_`{|}~)
HEXBRK: BRMSK. (-1,-1,-1,-1,0123456789ABCDEFabcdef) ; Hexadecimal field
DECBRK: BRMSK. (-1,-1,-1,-1,0123456789) ; Decimal field
SUBTTL Primary Command Table
PB$INI::$INIT (SUBCMD)
SUBCMD: $KEYDSP (SUBTAB,<$DEFAULT(SUBMIT)>) ; Standard SNASUB Commands
SUBTAB: $STAB
SUBKEY (PB$EXT,EXT,<EXIT>)
SUBKEY (PB$SUB,SUB,<SUBMIT>)
$ETAB
; Extended commands (not included in syntax tree at this time)
EXECMD: $KEYDSP (EXETAB) ; TOPS-20 Extended Commands
EXETAB: $STAB
SUBKEY (CONFRM,DDT,<DDT>)
SUBKEY (PB$HLP,HLP,<HELP>)
SUBKEY (CONFRM,PSH,<PUSH>)
SUBKEY (PB$TAK,TAK,<TAKE>)
$ETAB
CONFRM: $CRLF
SUBTTL Secondary Command Table (/PROCESSING-NODE prompt)
PB$NOD::$INIT (NODCMD)
NODCMD: PRONOD (CONFRM) ; /PROCESSING-NODE:
SUBTTL EXIT - Exit from program
PB$EXT: $NOISE (CONFRM,<from program>)
SUBTTL HELP - Provide help message
PB$HLP: $NOISE (HLP100,<with command>)
HLP100: $KEY (CONFRM,HLP102)
HLP102: $STAB
PARKEY (,EXT,^D2,<EXIT>)
PARKEY (,HLP,^D3,<HELP>)
$ETAB
SUBTTL SUBMIT - Submit filespec
PB$SUB: NETIFI (SUB100,NODNAM##)
SUB100: SWITCH
SUBTTL TAKE - Process Indirect Command File
PB$TAK: $NOISE (TAK100,<commands from file>)
TAK100: $IFILE (TAK102)
TAK102: $SWIDSP (TAK104,<$ALTERNATE(CONFRM),$DEFAULT(/NODISPLAY)>)
TAK104: $STAB
PARKEY (CONFRM,DIS,^D1,<DISPLAY>)
PARKEY (CONFRM,NDS,^D0,<NODISPLAY>)
$ETAB
SUBTTL BUFINI Initialize buffer
;++
; FUNCTIONAL DESCRIPTION:
;
; Function to initialize data buffer to zero.
;
; FORMAL PARAMETERS:
;
; Calling sequence: BUFINI (BUFADR, BUFLEN);
;
; BUFADR - Address of data buffer
; BUFLEN - Length of data buffer in words
;
; IMPLICIT INPUTS:
;
; none.
;
; ROUTINE VALUE:
;
; none.
;
; COMPLETION CODES:
;
; none.
;
; SIDE EFFECTS:
;
; Content of buffer BUFADR is set to zero.
;
;--
AC1=1
AC2=2
AC3=3
AC5=5
FP=15
SP=17
ENTRY BUFINI
BUFINI::
JSP AC5,INI.1 ; Save pointers
MOVE AC1,-3(FP) ; Get the address of the buffer
MOVE AC2,AC1 ; BLT source block address
ADDI AC2,1
HRL AC2,AC1 ; BLT destination block address
SETZM 0(AC1) ; Zero out the first word
MOVE AC3,-2(FP) ; Get the size of the buffer
ADD AC1,AC3 ; Calculate BLT length
SUBI AC1,1
BLT AC2,@AC1 ; Perforate block using BLT
JRST INI.2 ; Restore pointers and return
INI.1:
PUSH SP,FP ; Push frame pointer down on stack
HRRZ FP,SP
JRST 0(AC5)
INI.2:
POP SP,FP ; Restore frame pointer from stack
POPJ SP,0
SUBTTL U$DDT - Interface To DDT Debugger
;++
; FUNCTIONAL DESCRIPTION:
;
; Function to map SYS:UDDT.EXE and pass control to it.
;
; FORMAL PARAMETERS:
;
; Calling sequence: UDDT ();
;
; IMPLICIT INPUTS:
;
; none.
;
; ROUTINE VALUE:
;
; none.
;
; COMPLETION CODES:
;
; none.
;
; SIDE EFFECTS:
;
; none.
;
;--
ENTRY UDDT
UDDT::
SKIPE 770000 ; See if DDT is already mapped in
JRST UDDT.1 ; If already there, just jump to it
MOVX AC1,GJ%SHT+GJ%OLD
HRROI AC2,[ASCIZ /SYS:UDDT.EXE/]
GTJFN ; Get UDDT.EXE JFN. If fail, return to SNASUB
JRST [HRROI AC1,[ASCIZ /Cannot get JFN of DDT/]
PSOUT
POPJ SP,0]
HRLI AC1,.FHSLF ; Get current process handle
GET ; If fail, return to SNASUB
ERJMP [HRROI AC1,[ASCIZ /Cannot map in DDT/]
PSOUT
POPJ SP,0]
UDDT.1: ; Fix the return instruction of DDT
HRROI AC1,[ASCIZ /Type "SNA$X" to return to SNASUB
/]
PSOUT
MOVE AC1,[JRST UDDT.2]
MOVEM AC1,UDDT.3
MOVE AC1,116 ; Transfer control to DDT
MOVEM AC1,@770001
JRST 770000
UDDT.2:
MOVSI AC1,(JFCL)
MOVEM AC1,UDDT.3
POPJ SP,0
; Local variables
UDDT.3: JFCL
XPUNGE ; Expunge symbols before pass 2
OPDEF SUB [XCT UDDT.3]
SUBTTL Clean Up Symbol Table
PURGE CM%BRK
PURGE CM%DPP
PURGE CM%FNC
PURGE CM%HPP
PURGE CM%IDA
PURGE CM%ITM
PURGE CM%NSF
PURGE CM%PO
PURGE CM%SDH
PURGE .CMCFM
PURGE .CMCMA
PURGE .CMFIL
PURGE .CMFLD
PURGE .CMIFI
PURGE .CMINI
PURGE .CMKEY
PURGE .CMNOD
PURGE .CMNOI
PURGE .CMNUM
PURGE .CMNUX
PURGE .CMOFI
PURGE .CMQST
PURGE .CMSWI
PURGE .CMTAD
PURGE .CMTOK
PURGE .CMTXT
PURGE AC1 ; Purge symbols used in the macro
PURGE AC2 ; utilities
PURGE AC3
PURGE AC5
PURGE FP
PURGE SP
PURGE ERJMP
PURGE GET
PURGE GTJFN
PURGE PSOUT
PURGE .FHSLF
PURGE GJ%OLD
PURGE GJ%SHT
END ; End of SUB syntax declarations
; Local Modes:
; Mode:MACRO
; Auto Save Mode:2
; Comment Column:40
; Comment Rounding:+1
; End: