Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-07 - decus/20-0161/parunv.mac
There is 1 other file named parunv.mac in the archive. Click here to see a list.
;<P.HURLEY.2>PARUNV.MAC.2,  3-Aug-79 17:05:08, EDIT BY HURLEY
;<P.HURLEY.2>PARUNV.MAC.12, 17-Oct-77 19:27:44, EDIT BY HURLEY
;<P.HURLEY.2>PARUNV.MAC.11, 12-Oct-77 22:58:07, EDIT BY HURLEY

	UNIVERSAL PARUNV - DEFINITION FILE FOR THE PARSE ROUTINE

	SEARCH MONSYM

	SALL
	.DIRECTIVE .NOBIN	;NO NEED FOR A REL FILE

SUBTTL MACRO DEFINITIONS

COMMENT	$
DEFINE A MACRO TO GENERATE A COMND FUNCTION DESCRIPTOR BLOCK WITH
AN EXTRA WORD AT BLOCK-1 TO USE FOR FINDING NEXT FUNCTION DESCRIPTOR 
BLOCK LIST
THIS BLOCK IS TO BE CALLED A PARSER DESCRIPTOR BLOCK (PDB)
$


;	!=======================================================!
;	!  FUNCTION   !  FUNCTION   ! ADDRESS OF NEXT FUNCTION  !
;	!    CODE     !    FLAGS    !     DESCRIPTOR BLOCK      !
;	!-------------------------------------------------------!
;	!              DATA FOR SPECIFIC FUNCTION               !
;	!-------------------------------------------------------!
;	!            POINTER TO HELP TEXT FOR FIELD             !
;	!-------------------------------------------------------!
;	!          POINTER TO DEFAULT STRING FOR FIELD          !
;	+-------------------------------------------------------+
;	!          SPECIAL ACTION ROUTINE FOR THIS PDB          !
;	!-------------------------------------------------------!
;	!              PDB DEFAULT FILLING ROUTINE              !
;	!-------------------------------------------------------!
;	!                     ERROR ROUTINE                     !
;	!-------------------------------------------------------!
;	!             CHAIN POINTER TO LINKED PDB'S             !
;	!=======================================================!

COMMENT	\
ARGUMENTS TO THE PDBDEF MACRO ARE:
TYP	TYPE OF FDB, IE. .CMKEY
FLGS	FUNCTION SPECIFIC FLAGS
DATA	FUNCTION SPECIFIC DATA
HLPM	BYTE POINTER FOR HELP TEXT
DEFM	POINTER TO DEFAULT
LST	POINTER TO ALTERNATE FDB
NXT	PTR TO NEXT FDB (OPTIONAL FOR TYPE .CMKEY OR .CMSWI)
ERRTN	ROUTINE IF AN ERROR IS GOTTEN POINTING TO THIS PDB
RTN	SPECIAL ACTION ROUTINE FOR THIS PDB
DEFR	SPECIAL ROUTINE TO FILL IN DEFAULTS FOR THIS PDB
\
DEFINE PDBDEF(TYP,FLGS,DATA,HLPM,DEFM,LST,NXT,ERRTN,RTN,DEFR,BRKM),<
	XLIST

;THE NEXT FEW LINES ARE COPIED FROM MONSYM FOR THE FLDDB. MACRO
	..XX==<FLD(TYP,CM%FNC)>+FLGS+<Z LST>
   IFNB <HLPM>,<..XX=..XX+CM%HPP>
   IFNB <DEFM>,<..XX=..XX+CM%DPP>
	..XX
   IFNB <DATA>,<DATA>
   IFB <DATA>,<0>
   IFNB <HLPM>,<POINT 7,[ASCIZ \HLPM\]>
   IFB <HLPM>,<0>
   IFNB <DEFM>,<POINT 7,[ASCIZ \DEFM\]>
   IFB <DEFM>,<0>
   IFNB <BRKM>,<BRKM>
   IFB <BRKM>,<0>

;THE REST OF THE DEFINITION IS NOT USED BY THE JSYS BUT ONLY BY THE PARSER

   IFB <RTN>,<0>
   IFNB <RTN>,<Z RTN>
   IFB <DEFR>,<0>
   IFNB <DEFR>,<Z DEFR>
   IFB <ERRTN>,<0>
   IFNB <ERRTN>,<Z ERRTN>
   IFB <NXT>,<0>
   IFNB<NXT><Z NXT>
	LIST
>;END OF DEFINITION OF PDBDEF MACRO
SUBTTL	PDB  --  PARSER DESCRIPTOR BLOCK

;THIS BLOCK IS DEFINED BY THE PDBDEF MACRO
;THE SYMBOLS HERE ARE FOR REFERENCING IT

	PHASE	0

PDB.FD:!	BLOCK	.CMBRK+1 ;ALLOCATE SPACE FOR AN FDB
PDB.RT:!	BLOCK	1	;SPECIAL ACTION ROUTINE ADDRESS
PDB.DF:!	BLOCK	1	;DEFAULT FILLING ROUTINE ADDRESS
PDB.ER:!	BLOCK	1	;ERROR MESSAGE ROUTINE ADDRESS
PDB.NX:!	BLOCK	1	;ADDRESS OF PDB TO USE NEXT
PDB.SZ:!			;SIZE OF A PDB

	DEPHASE
SUBTTL COMMAND FUNCTION MACROS

DEFINE $KEYDSP (TABLE) <
	PDBDEF (.CMKEY,,TABLE)>

DEFINE $KEY (NXT,TABLE) <
	PDBDEF (.CMKEY,,TABLE,,,,NXT)>

DEFINE $NUMBER (NXT,RADIX,HELP) <
IFB <HELP>,<PDBDEF (.CMNUM,,RADIX,,,,NXT)>
IFNB <HELP>,<PDBDEF (.CMNUM,CM%SDH,RADIX,<HELP>,,,NXT)>>

DEFINE $NOISE (NXT,TEXT) <
	PDBDEF (.CMNOI,,<POINT 7,[ASCIZ/TEXT/]>,,,,NXT)>

DEFINE $SWITCH (NXT,TABLE) <
	PDBDEF (.CMSWI,,TABLE,,,,,NXT)>

DEFINE $IFILE (NXT,HELP) <
IFB <HELP>,<PDBDEF (.CMIFI,,,,,,NXT)>
IFNB <HELP>,<PDBDEF (.CMIFI,CM%SDH,,<HELP>,,,NXT)>>

DEFINE $OFILE (NXT,HELP) <
IFB <HELP>,<PDBDEF (.CMOFI,,,,,,NXT)>
IFNB <HELP>,<PDBDEF (.CMOFI,CM%SDH,,<HELP>,,,NXT)>>

DEFINE $FIELD (NXT,HELP) <
IFB <HELP>,<PDBDEF (.CMFLD,,,,,,NXT)>
IFNB <HELP>,<PDBDEF (.CMFLD,CM%SDH,,<HELP>,,,NXT)>>

DEFINE $CRLF <
	PDBDEF (.CMCFM)>

DEFINE $DIR (NXT) <
	PDBDEF (.CMDIR,,,,,,NXT)>

DEFINE $USER (NXT) <
	PDBDEF (.CMUSR,,,,,,NXT)>

DEFINE $COMMA (NXT) <
	PDBDEF (.CMCMA,,,,,,NXT)>

DEFINE $INIT (NXT) <
	PDBDEF (.CMINI,,,,,,NXT)>

DEFINE $FLOAT (NXT,HELP) <
IFB <HELP>,<PDBDEF (.CMFLT,,,,,,NXT)>
IFNB <HELP>,<PDBDEF (.CMFLT,CM%SDH,,<HELP>,,,NXT)>>

DEFINE $DEV (NXT) <
	PDBDEF (.CMDEV,,,,,,NXT)>

DEFINE $TEXT (NXT,HELP) <
IFB <HELP>,<PDBDEF (.CMTXT,,,,,,NXT)>
IFNB <HELP>,<PDBDEF (.CMTXT,CM%SDH,,<HELP>,,,NXT)>>

DEFINE $DATE (NXT) <
	PDBDEF (.CMTAD,,CM%IDA,,,,NXT)>

DEFINE $TIME (NXT) <
	PDBDEF (.CMTAD,,CM%ITM,,,,NXT)>

DEFINE $TAD (NXT) <
	PDBDEF (.CMTAD,,<CM%IDA!CM%ITM>,,,,NXT)>

DEFINE $QUOTE (NXT,HELP) <
IFB <HELP>,<PDBDEF (.CMQST,,,,,,NXT)>
IFNB <HELP>,<PDBDEF (.CMQST,CM%SDH,,<HELP>,,,NXT)>>

DEFINE $TOKEN (NXT,CHAR) <
	PDBDEF (.CMTOK,,<CHAR>,,,,NXT)>

DEFINE DSPTAB (NXT,CODE,KEY) <
	XWD [ASCIZ\KEY\],[XWD CODE,NXT]>

DEFINE KEYTAB (CODE,KEY)	<
	XWD [ASCIZ\KEY\],CODE>

DEFINE $STAB (%X,%Y) <
	%X==.
	XWD %Y-1,%Y-1
	DEFINE $ETAB <
	%Y==.-%X>>

	END