Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-07 - 43,50450/b11mac.req
There are no other files named b11mac.req in the archive.
00100	% B11MAC.REQ VERSION 2.2 % SWITCHES NOLIST;
00200	UNDECLARE ?..........;
00300	%
00400		BLISS-11 UTILITY MACROS
00500	
00600	AUTHOR:
00700		K. E. GORLEN
00800		RM. 2017, BG. 12A
00900		DIVISION OF COMPUTER RESEARCH AND TECHNOLOGY
01000		NATIONAL INSTITUTES OF HEALTH
01100		BETHESDA, MD. 20014
01200		PHONE: (301) 496-5361
01300		MAY 19, 1975
01400	
01500	SEE RSXMAC.DOC FOR DOCUMENTATION.
01600	
01700	%
01800	!
01900	! ?.PACKBYTE -- PACKED BYTE <PLITARG>
02000	!
02100	    UNDECLARE $QUOTE ?.PACKBYTE, $QUOTE ?.PACKBYTEA;
02200	    MACRO ?.PACKBYTE[]=?.PACKBYTEA($REMAINING,0)$,
02300		?.PACKBYTEA[LO,HI]=((HI)^8+((LO) AND #377))$;
02400	!
02500	! ?.SUBLIST -- REMOVE BRACKETS FROM PARAMETER SUBLIST
02600	!
02700	    UNDECLARE $QUOTE ?.SUBLIST, $QUOTE ?.SUBLISTA;
02800	    MACRO ?.SUBLIST[P]=?.SUBLISTA P $,
02900		?.SUBLISTA[P]=P+0 $;
03000	!
03100	! ?.REVERSE -- REVERSE PARAMETER LIST
03200	!
03300	    UNDECLARE $QUOTE ?.REVERSE;
03400	    MACRO ?.REVERSE(P)[]=
03500		?.REVERSE($REMAINING) ?.COMMA($REMAINING) P $;
03600	!
03700	! ?.SAVEREG -- FORCE COMPILER TO SAVE SPECIFIED REGISTERS
03800	!
03900	    UNDECLARE $QUOTE ?.SAVEREG;
04000	    MACRO ?.SAVEREG[R]=R=.R+1;R=.R-1$;
04100	!
04200	! ?.SET -- RE-BIND NAME TO VALUE
04300	!
04400	    UNDECLARE $QUOTE ?.SET;
04500	    MACRO ?.SET(NAME,VALUE)=
04600		BIND ?.TEMP=(VALUE);
04700		UNDECLARE NAME;
04800		BIND NAME=?.TEMP;
04900		UNDECLARE ?.TEMP $;
05000	!
05100	! ?.ASGNC -- CONDITIONAL ASSIGNMENT
05200	!
05300	    UNDECLARE $QUOTE ?.ASGNC;
05400	    MACRO ?.ASGNC(DST,SRC)[]=DST=SRC$;
05500	!
05600	! ?.POS -- EXTRACT POSITION COMPONENT OF PSM PAIR(S)
05700	!
05800	    UNDECLARE $QUOTE ?.POS;
05900	    MACRO ?.POS[POS,SIZE]=(POS)$;
06000	!
06100	! ?.SIZE -- EXTRACT SIZE COMPONENT OF PSM PAIR(S)
06200	!
06300	    UNDECLARE $QUOTE ?.SIZE;
06400	    MACRO ?.SIZE[POS,SIZE]=(SIZE)$;
06500	!
06600	! ?.MASK -- FORM MASK FROM PSM PAIR(S)
06700	!
06800	    UNDECLARE $QUOTE ?.MASK, $QUOTE ?.ORMASK;
06900	    MACRO ?.MASK(POS,SIZE)[]=((1^(SIZE)-1)^(POS) ?.ORMASK($REMAINING))$,
07000		?.ORMASK[]=OR ?.MASK($REMAINING)$;
07100	!
07200	! ?.SELECT -- SELECTIVE EXPANSION IF PARAMETER NULL OR NOT NULL
07300	!
07400	    UNDECLARE $QUOTE ?.SELECT, $QUOTE ?.SELECTA, $QUOTE ?.SELECTB,
07500		$QUOTE ?.SELECTC;
07600	    MACRO ?.SELECT(P,NONNULL,NULL)=
07700		?.SELECTA(?.COND(P,NONNULL) ?.COMMA(P) NULL)$,
07800	        ?.SELECTA(P1,P2)=?.SELECTB(P1)$,
07900	        ?.SELECTB(P)[]=?.SELECTC P $,
08000	        ?.SELECTC[]=$REMAINING $;
08100	!
08200	! ?.COND -- CONDITIONAL EXPANSION IF PARAMETER NOT NULL
08300	!
08400	    UNDECLARE $QUOTE ?.COND, $QUOTE ?.CONDA;
08500	    MACRO ?.COND(P,NONNULL)=?.CONDA(NONNULL,P)$,
08600		?.CONDA(NONNULL,P)[]=NONNULL$;
08700	!
08800	! ?.DEFAULT -- DEFAULT NULL PARAMETER
08900	!
09000	    UNDECLARE $QUOTE ?.DEFAULT, $QUOTE ?.DEFAULTA;
09100	    MACRO ?.DEFAULT(P,DFLT)=?.DEFAULTA(P ?.COMMA(P) DFLT)$,
09200		?.DEFAULTA(P,DFLT)=P$;
09300	!
09400	! ?.COMMA -- GENERATE CONDITIONAL COMMA
09500	!
09600	    UNDECLARE $QUOTE ?.COMMA;
09700	    MACRO ?.COMMA[]=,$;
09800	SWITCHES LIST;