Trailing-Edge
-
PDP-10 Archives
-
BB-X117B-SB_1986
-
10,7/nml/galaxy.r36
There is 1 other file named galaxy.r36 in the archive. Click here to see a list.
! UPD ID= 51, SNARK:<6.1.NML>GALAXY.R36.3, 6-Jun-84 11:27:11 by HALPIN
! Removed the BLI: from the GLXORN require statement. GLXORN is located
! in the NML Library, not in the BLISS area.
!
! UPD ID= 20, SNARK:<6.1.NML>GALAXY.R36.2, 24-May-84 13:56:56 by GLINDELL
! DSKT:GALAXY.R36[10,6026,NMLBLI] 14-Feb-84 10:21:30, Edit by DAVENPORT
!
! Require GLXMAC and ORNMAC seperatly instead of as a single file (GLXORN).
! Undeclare some ORNMAC parser flag definitions to avoid conflicts with
! OPRPAR routine names.
!
%title 'GALAXY -- GALAXY Field Set Definitions'
! COPYRIGHT (c) 1980 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 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: DECnet-10/20 V3.0 Network Control Program (NCP)
!
! ABSTRACT:
!
! Contains the ORION IPCF message format descriptions
! for messages used by NCP.
!
! ENVIRONMENT: TOPS-10/20 User mode under NML
!
! AUTHOR: Dale C. Gunn , CREATION DATE: 21-Aug-80
!
! MODIFIED BY:
!
! maintainer, date : VERSION nnn
!
! 01 - Description of modification
!--
!
! TABLE OF CONTENTS
!
!
! INCLUDE FILES:
!
require 'SYSTYP'; ! Get $TOPS10/$TOPS20 switch
%if $TOPS20
%then
require 'GLXORN'; ! Assorted items from GLXMAC, ORNMAC
%fi
%if $TOPS10
%then
require 'BLI:GLXMAC'; ! GLXMAC literals
require 'BLI:ORNMAC'; ! ORNMAC literals
undeclare P$TAKE, P$CTAK, P$ACTE; ! Remove parser flag definitions
undeclare P$NPRO, P$ERRO, P$REPA; ! to avoid OPRPAR routine conflicts
undeclare P$INTE, P$DSPT, P$ENDT, P$DERR, P$CEOF;
undeclare $CHNUL, $CHCNA, $CHCNB, $CHCNC, $CHCND, $CHCNE;
undeclare $CHCNF, $CHBEL, $CHCBS, $CHTAB, $CHLFD, $CHVTB;
undeclare $CHFFD, $CHCRT, $CHCNN, $CHCNO, $CHCNP, $CHCNQ;
undeclare $CHCNR, $CHCNS, $CHCNT, $CHCNU, $CHCNV, $CHCNW;
undeclare $CHCNX, $CHCNY, $CHCNZ, $CHESC, $CHCUN, $CHAL2;
undeclare $CHCCF, $CHDEL, $CHCRB, $CHALT, $CHBSP, PC_CY0;
undeclare PC_CY1, PC_AFI, PC_BIS, PC_FUF, PC_ATN, PC_LIP;
undeclare PC_NDV, PC_FOV, PC_OVF, PC_UIO, PC_USR;
%fi
undeclare $TOPS10, $TOPS20, $X25, $MCB; ! Delete SYSTYP declarations
%sbttl 'Macro Definitions'
! $P (mask) - Calculate bit position of a literal mask
!
! where mask is a literal or symbol which defines a
! field as a series of contiguous bits
!
! returns pos, which may be used in a context such
! as, ADDRESS<pos,siz>, or FIELD_NAME = [ADDR,pos,siz,sgn]
macro $P (MASK) =
%nbitsu (MASK and -MASK) - 1 %;
! $S (mask) - Calculate size in bits of a literal mask
!
! where mask is a literal or symbol which defines a
! field as a series of contiguous bits
!
! returns siz, which may be used in a context such
! as, ADDRESS<pos,siz>, or FIELD_NAME = [ADDR,pos,siz,sgn]
macro $S (MASK) =
%nbitsu (MASK) - %nbitsu (MASK and -MASK) + 1 %;
! $P$S (mask) - Calculate bit position and size of a literal mask
!
! where mask is a literal or symbol which defines a
! field as a series of contiguous bits
!
! returns 'pos , siz', which may be used in a context such
! as, ADDRESS<pos,siz>, or FIELD_NAME = [ADDR,pos,siz,sgn]
!
! E.g, XCB_1 = [2,$P$S(XCB_MASK),0]
macro $P$S (MASK) =
$P (MASK) , $S (MASK) %;
%sbttl 'MS Data Structure Definitions'
! MS_BLOCK (length) - Allocate and define fields of GALAXY MS block
!
! where 'length' is the length not including the header of
! the block to be allocated. Used in a context such as
! OWN MS_BLOCK (5);.
macro MS_BLOCK (XL) =
%if not %null(XL)
%then block[(XL)] field(MS_FIELDS)
%else block[$OHDRS] field(MS_FIELDS)
%fi %;
! ALLOCATE_MS (keywords) - Allocate GALAXY MS block
!
! where keywords may be one of the following:
!
! TYPE The GALAXY message type code to be placed in the
! .MSTYP field of the MS block.
! FLAGS The message flags to be turned on in the .MSFLG
! field.
! CODE A value to be placed in the .MSCOD field.
! AFLAGS ORION message argument flags to be placed in the
! .OFLAG field.
! ARGUMENTS A list of argument blocks, enclosed in
! parentheses, to be placed in the message.
! Each argument, enclosed in a second set of
! parantheses, is formatted as
! '(arg-type,data-list)' where arg-type is
! the GALAXY argument type code to be placed
! in the AR.TYP field of the argument block.
! The data-list is a list of data items, each
! no more than a single BLISS value in
! length, and enclosed in parentheses if more
! than a single item is specified.
!
! As an example:
!
! own
! ORION_MESSAGE:
! ALLOCATE_MS (TYPE = $OMLOG,
! FLAGS = MF$ACK,
! ARGUMENTS = (($WTACD, 0),
! ($WTTXT, (%ascii 'NCP S',
! %ascii 'IGNED',
! %ascii ' ON '))));
compiletime
XMS__ARG__OFFSET = 0,
XMS__DATA__OFFSET = 0;
keywordmacro ALLOCATE_MS (TYPE, FLAGS, CODE, LENGTH, AFLAGS, ARGUMENTS) =
%assign (XMS__ARG__OFFSET, 0)
XMS_ARG_SIZE (%remove (ARGUMENTS))
block [$OHDRS + XMS__ARG__OFFSET]
field (MS_FIELDS)
preset ([CNT$MS] = $OHDRS + XMS__ARG__OFFSET,
%if not %null (TYPE) %then [TYP$MS] = TYPE, %fi
%if not %null (FLAGS) %then [FLGMS$] = FLAGS, %fi
%if not %null (CODE) %then [CODMS$] = CODE, %fi
XMS_ARGS (AFLAGS,ARGUMENTS))
%; ! End of Macro ALLOCATE_MS
! Internal macros to be called only by ALLOCATE_MS macro
macro XMS_ARGS (AFLAGS) [] =
%if not %null (AFLAGS) %then [FLAGO$] = AFLAGS, %fi
[ARGCO$] = %length - 1,
XMS__ARG__EXPAND (%remove (%remaining))
%; ! End of Macro XMS_ARGS
macro XMS__ARG__EXPAND [ARG] =
%assign (XMS__ARG__OFFSET, 0)
XMS__ARG (%remove (ARG))
%; ! End of Macro XMS__ARG__EXPAND
macro XMS__ARG [TYPE,DATA] =
[$OHDRS+ARG$HD+XMS__ARG__OFFSET,$P$S(AR$TYP),0] = TYPE,
%assign (XMS__DATA__OFFSET, 0)
%if not %null (DATA)
%then XMS__ARG__DATA (%remove (DATA)),
%fi
[$OHDRS+ARG$HD+XMS__ARG__OFFSET,$P$S(AR$LEN),0] = XMS__DATA__OFFSET + 1
%assign (XMS__ARG__OFFSET, XMS__ARG__OFFSET + XMS__DATA__OFFSET + 1)
%; ! End of Macro XMS__ARG
macro XMS__ARG__DATA [DATA] =
[$OHDRS+ARG$DA+XMS__ARG__OFFSET+XMS__DATA__OFFSET,0,36,0] = DATA
%assign (XMS__DATA__OFFSET, XMS__DATA__OFFSET + 1)
%; ! End of Macro XMS__ARG__DATA
macro XMS_ARG_SIZE [] =
%assign (XMS__ARG__OFFSET, XMS__ARG__OFFSET + 1)
XMS__DATA__SIZE (%remove (%remaining))
%; ! End of Macro XMS_ARG_SIZE
macro XMS__DATA__SIZE (TYPE) [] =
%assign (XMS__ARG__OFFSET, XMS__ARG__OFFSET + 1)
XMS__DATA__SIZE (%remaining)
%; ! End of Macro XMS__DATA__SIZE
macro XMS_ARG_COUNT [] =
%length
%; ! End of macro XMS_ARG_COUNT
%sbttl 'OPRPAR Interface Macros'
macro OPRPAR_INTF (RTN, R1, R2, A1, A2) =
begin
global register
S1 = 1,
S2 = 2;
if RTN (%if not %null(A1) %then A1 %fi
%if not %null(A2) %then , A2 %fi)
then begin
%if not %null(R1)
%then R1 = .S1; %fi
%if not %null(R2)
%then R2 = .S2; %fi
(1 eql 1) ! True
end
else begin
%if not %null(R1)
%then R1 = .S1; %fi
%if not %null(R2)
%then R2 = .S2; %fi
(1 eql 0) ! False
end
end %; ! End of Macro OPRPAR_INTF
macro
P_SETUP (PB) =
OPRPAR_INTF (P$SETUP,,, PB) %,
P_HELP (FILE, TOPIC) =
OPRPAR_INTF (P$HELP,,, FILE, TOPIC) %,
P_CURR (ADDRESS) =
OPRPAR_INTF (P$CURR, ADDRESS) %,
P_PREV (ADDRESS) =
OPRPAR_INTF (P$PREV, ADDRESS) %,
P_NEXT (ADDRESS, LENGTH) =
OPRPAR_INTF (P$NEXT, ADDRESS, LENGTH) %,
P_NFLD (TYPE, ADDRESS) =
OPRPAR_INTF (P$NFLD, TYPE, ADDRESS) %,
P_NARG (TYPE, ADDRESS) =
OPRPAR_INTF (P$NARG, TYPE, ADDRESS) %,
P_CFM (TYPE) =
OPRPAR_INTF (P$CFM, TYPE) %,
P_COMMA (TYPE) =
OPRPAR_INTF (P$COMMA, TYPE) %,
P_KEYW (CODE) =
OPRPAR_INTF (P$KEYW, CODE) %,
P_SWIT (CODE) =
OPRPAR_INTF (P$SWIT, CODE) %,
P_USER (PPN) =
OPRPAR_INTF (P$USER, PPN) %,
P_FLOT (NUMBER) =
OPRPAR_INTF (P$FLOT, NUMBER) %,
P_DIR (PPN) =
OPRPAR_INTF (P$DIR, PPN) %,
P_TIME (UDT) =
OPRPAR_INTF (P$TIME, UDT) %,
P_NUM (NUMBER, RADIX) =
OPRPAR_INTF (P$NUM, NUMBER, RADIX) %,
P_FILE (ADDRESS, LENGTH) =
OPRPAR_INTF (P$FILE, ADDRESS, LENGTH) %,
P_IFIL (ADDRESS, LENGTH) =
OPRPAR_INTF (P$IFIL, ADDRESS, LENGTH) %,
P_OFIL (ADDRESS, LENGTH) =
OPRPAR_INTF (P$OFIL, ADDRESS, LENGTH) %,
P_FLD (ADDRESS, LENGTH) =
OPRPAR_INTF (P$FLD, ADDRESS, LENGTH) %,
P_TOK (ADDRESS, LENGTH) =
OPRPAR_INTF (P$TOK, ADDRESS, LENGTH) %,
P_NODE (NODE_NAME) =
OPRPAR_INTF (P$NODE, NODE_NAME) %,
P_SIXF (SIXBIT) =
OPRPAR_INTF (P$SIXF, SIXBIT) %,
P_RNGE (LO, HI) =
OPRPAR_INTF (P$RNGE, LO, HI) %,
P_TEXT (ADDRESS, LENGTH) =
OPRPAR_INTF (P$TEXT, ADDRESS, LENGTH) %,
P_DEV (ADDRESS, LENGTH) =
OPRPAR_INTF (P$DEV, ADDRESS, LENGTH) %,
P_QSTR (ADDRESS, LENGTH) =
OPRPAR_INTF (P$QSTR, ADDRESS, LENGTH) %,
P_UQSTR (ADDRESS, LENGTH) =
OPRPAR_INTF (P$UQSTR, ADDRESS, LENGTH) %,
P_ACCT (ADDRESS, LENGTH) =
OPRPAR_INTF (P$ACCT, ADDRESS, LENGTH) %;
%sbttl 'GALAXY Message Block'
! Among GALAXY programs, there is a common message header format
! so that communication and error checking is easier. There are
! also some common function codes (currently only TEXT) which are
! defined across program lines. The specific data (if any) associated
! with each message type follows the standard header. Note also
! that MESSAGE LENGTH includes the header itself.
! !=======================================================!
! ! Message Length ! Message Type !
! !-------------------------------------------------------!
! !ACK!NOM!FAT!WRN!MOR! ! Sixbit Suffix !
! !-------------------------------------------------------!
! ! Acknowledgement code !
! !=======================================================!
literal
PAGE_SIZE = 512; ! Maximum size of IPCF packet
field MS_FIELDS =
set
TYPMS$ = [$MSTYP,0,36,0], ! MESSAGE TYPE WORD
CNT$MS = [$MSTYP,$P$S(MS$CNT),0], ! MESSAGE LENGTH
TYP$MS = [$MSTYP,$P$S(MS$TYP),0], ! MESSAGE TYPE
! MT.OFF==700000 ! OFFSET TO THE COMMON CODES
! MT.TXT==700000 ! TEXT MESSAGE
FLGMS$ = [$MSFLG,0,36,0], ! FLAGS WORD
ACK$MF = [$MSFLG,$P$S(MF$ACK),0], ! 1B0 ACKNOWLEDGEMENT REQUESTED
NOM$MF = [$MSFLG,$P$S(MF$NOM),0], ! 1B1 NO MESSAGE, JUST AN ACK
FAT$MF = [$MSFLG,$P$S(MF$FAT),0], ! 1B2 FATAL MESSAGE
WRN$MF = [$MSFLG,$P$S(MF$WRN),0], ! 1B3 WARNING MESSAGE
MOR$MF = [$MSFLG,$P$S(MF$MOR),0], ! 1B4 MORE MESSAGE FOLLOWS
SUF$MF = [$MSFLG,$P$S(MF$SUF),0], ! SUFFIX FOR TEXT MESSAGE
CODMS$ = [$MSCOD,0,36,0], ! USER SUPPLIED CODE USED FOR ACK'ING
FLAGO$ = [$OFLAG,0,36,0], ! Argument Flags
ARGCO$ = [$OARGC,0,36,0], ! Argument Count
HD$ARG_1 = [$OHDRS+ARG$HD,0,36,0], ! Argument header word
LEN$AR_1 = [$OHDRS+ARG$HD,$P$S(AR$LEN),0], ! Length of argument block
TYP$AR_1 = [$OHDRS+ARG$HD,$P$S(AR$TYP),0], ! Type of argument block
DA$ARG_1 = [$OHDRS+ARG$DA,0,36,0] ! First word of argument data
tes;
field ARG_FIELDS = ! Relocatable Argument Block
set
HD$ARG = [ARG$HD,0,36,0], ! Argument header word
LEN$AR = [ARG$HD,$P$S(AR$LEN),0], ! Length of argument block
TYP$AR = [ARG$HD,$P$S(AR$TYP),0], ! Type of argument block
DA$ARG = [ARG$DA,0,36,0] ! First word of argument data
tes;
macro ARG_BLOCK (XL) =
%if not %null(XL)
%then block[(XL)] field(ARG_FIELDS)
%else block[1] field(ARG_FIELDS)
%fi %;
%sbttl 'GALAXY Command Message'
!This message consists of the standard message header followed by a Parser
!Block (PB) as defined below. This block is built by the routine PARSER
!in the module OPRPAR.
! !=======================================================!
! \ \
! \ THE MESSAGE HEADER \
! \ \
! !=======================================================!
! ! FLAG WORD !
! !-------------------------------------------------------!
! ! ARGUMENT COUNT !
! !=======================================================!
! !-------------------------------------------------------!
! ! COMMAND OBJECT TYPE !
! !-------------------------------------------------------!
! ! SOURCE NODE !
! !-------------------------------------------------------!
! ! OFFSET TO PARSER BLOCK !
! !-------------------------------------------------------!
! ! OFFSET TO TEXT OF COMMAND !
! !=======================================================!
! Note: This definition maps from the origin of the MS block.
field COM_FIELDS =
set
TY$COM = [COM$TY,0,36,0], ! Object Type Code
! Valid for Applications only
SN$COM = [COM$SN,0,36,0], ! Source node of command
PB$COM = [COM$PB,0,36,0], ! Pointer to the Parser Block
CM$COM = [COM$CM,0,36,0] ! Pointer to message text
tes;
macro COM_BLOCK (XL) =
%if not %null(XL)
%then block[(XL)] field(COM_FIELDS)
%else block[COM$SZ] field(COM_FIELDS)
%fi %;
%sbttl 'GALAXY Linkage Definitions'
linkage GALXYS =
pushj(register=1,register=2):
linkage_regs (15,14,0)
nopreserve (0,1,2,3,4)
preserve (5,6,7,8,9,10,11,12,13);
! Special linkage for calling OPRPAR semantic scanners
! These are used because no arguments are passed to them, but
! register 0 returns T/F flag and register 1 and 2 return value.
linkage GALXYO =
pushj:
linkage_regs (15,14,0)
global (S1=1,S2=2)
nopreserve (0,3,4)
preserve (5,6,7,8,9,10,11,12,13);
%title ''
%sbttl ''
!
! End of GALAXY.R36
! Local Modes:
! Mode:BLISS
! Auto Save Mode:2
! Comment Column:40
! Comment Rounding:+1
! End: