Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50325/of2.bli
There are no other files named of2.bli in the archive.
! File:   OF2.BLI
!
!    This work was supported by the Advanced Research
!    Projects Agency of the Office of the Secretary of
!    Defense (F44620-73-C-0074) and is monitored by the
!    Air Force Office of Scientific Research.

MODULE OF2(TIMER=EXTERNAL(SIX12))=
BEGIN
REQUIRE COMMON.BEG;
REQUIRE PREDEF.BEG;
REQUIRE GTST.BEG;
REQUIRE ST.BEG;
REQUIRE GTX.BEG;
REQUIRE LDSF.BEG;
REQUIRE LDSFT.BEG;
REQUIRE STRUCT.BEG;
REQUIRE TN.BEG;
BEGIN
    EXTERNAL IST,ISTG,TNCHAIN;
    MACRO IDT(VALUE,ADDINF)=(DT[VALUE]_ADDINF;DTPF[VALUE]_0)$;

ROUTINE DCLEXT(N1,N2)=
    BEGIN
    ISTG(.N1,.N2,EXTERNALT,0);
    DEFEXT(.STE);
    LEXOUT(BNDVAR,.STE)
    END;


    GLOBAL ROUTINE ONCEF2=
    BEGIN
    ! THIS IS DUPLICATE IN FUNCTION TO OF1

BIND REGSPLIT=PLIT(
	'PC',	PCREG<0,36>,
	'SP',	SPREG<0,36>,
	'VREG',	VVREG<0,36>,
	'R0',	RR0<0,36>,
	'R1',	RR1<0,36>,
	'R2',	RR2<0,36>,
	'R3',	RR3<0,36>,
	'R4',	RR4<0,36>,
	'R5',	RR5<0,36>	);

INCR I FROM 0 TO .REGSPLIT[-1]-2 BY 2 DO
    BEGIN
	MAP STVEC STE;
	ISTG(.REGSPLIT[.I],0,REGT,0);
	.REGSPLIT[.I+1]_.STE;
	STE[MODE]_0;
	STE[POSF]_0;
	STE[SIZEF]_16;
    END;

	TNCHAIN<18,18>_TNCHAIN<0,18>_TNCHAIN<0,0>;



    ! H. NOW INITIALIZE RESERVED WORD DELIMITER SYMBOL
    !    TABLE ENTRIES (CONTINUED).
    !    SEE RUND AND SKAN IN "LEXSYN.BLI".
    !
    !    TABLE FORMAT:
    !
    !    THOSE DELIMITER CHARACTERS (NON-ALPHANUMERIC) FOR WHICH
    !    NO SPECIAL EDITING FUNCTION EXISTS--E.G. BLANK,!,%, ETC.--
    !    ARE USED AS INDICES INTO THE DELIMITER TABLE, DT.  THE POS-
    !    ITIONS WHICH SUCH CHARACTERS INDEX MUST CONTAIN A DELIMITER
    !    LEXEME (VALUE OF DEL), EVEN IF IT MAY NOT BE USED IN THE
    !    LANGUAGE--E.G. &.
    !
    !    THE REMAINING POSITIONS ARE AVAILABLE FOR USE BY RESERVED WORDS,
    !    WHOSE ST ADDITIONAL INFORMATION WORD IS AN INDEX TO
    !    ITS CORRESPONDING LEXEME (SEE IST IN "ONCE.BLI").
    !
    !    LEAVE NOTES WHEN A RESERVED WORD IS DELETED AND MAKE
    !    ADDITIONS FROM THE POINT SO MARKED (SEQUENTIALLY).  THE TABLE
    !    MAY SAFELY BE EXPANDED BEYOND #200 (# 7-BIT ASCII CHARS) WORDS
    !    BY CHANGING DTSIZE IN BEGIN.BLI.


BEGIN
BIND IST0PLIT=PLIT(
	'BEGIN',HBEGIN,	#1,
	'CASE',	HCASE,	#2,
	'DECR',	HDECR,	#3,
	'IF',	HIF,	#4,
	'INCR',	HINCR,	#5,
	'SET',	HSET,	#6,
	'UNTIL',HUNTIL,	#7,
	'WHILE',HWHILE,	#10,
	'DO',	HDO,	#11,
!	'EXCHJ',HEXCHJ,	#12,	! EXCHJ IS NOW A ROUTINE NAME INSTEAD OF A DELIMITER
	'AT',	HCRAT,	#15,
	'END',	HEND,	#16,
	'OF',	HOF,	#17,
	'FROM', HFROM,	#20,
	'THEN', HTHEN,	#21,
	'TO',	HTO,	#22,
	'TES',	HTES,	#23,
	'ELSE', HELSE,	#24,
	'BY',	HBY,	#25,
	'NSET',	HNSET,	#27,
	'TESN',	HTESN,	#30,
	'OR',	HOR,	#33,
	'XOR',	HXOR,	#34,
	'EQV',	HEQV,	#35,
	'AND',	HAND,	#36,
	'NOT',	HNOT,	#37,
	'LSS',	HLSS,	#40,
	'LEQ',	HLEQ,	#41,
	'EQL',	HEQL,	#42,
	'NEQ',	HNEQ,	#43,
	'GEQ',	HGEQ,	#45,
	'MOD',	HMOD,	#47,
	'DIV',	HDIV,	#57,	! ALSO TAKES CARE OF "/" .
	'OWN',	HOWN,	#61,
	'MAP',	HMAP,	#66,
	'BIND',	HBIND,	#67,
	'LOCAL',HLOCAL,	#70,
	'MACRO',HMACRO, #71	);

BIND ISTPLIT=PLIT(
	'CREAT','E',	HCREATE,    #12,
	'LENGT','H',	HLENGTH,    #14,
	'SELEC','T',	HSELECT,    #26,
	'ALWAY','S',	HALWAYS,    #31,
	'OTHER','WISE',	HOTHERWISE, #32,
	'REGIS','TER',	HREGISTER,  #60,
	'GLOBA','L',	HGLOBAL,    #62,
	'EXTER','NAL',	HEXTERNAL,  #63,
	'ROUTI','NE',	HROUTINE,   #64,
	'STRUC','TURE',	HSTRUCTURE, #65,
	'FORWA','RD',	HFORWARD,   #77		);

INCR I FROM 0 TO .IST0PLIT[-1]-3 BY 3 DO
    IST(.IST0PLIT[.I],0,
	.IST0PLIT[.I+1],
	.IST0PLIT[.I+2]);
INCR I FROM 0 TO .ISTPLIT[-1]-4 BY 4 DO
    IST(.ISTPLIT[.I],
	.ISTPLIT[.I+1],
	.ISTPLIT[.I+2],
	.ISTPLIT[.I+3]);
END;


BEGIN
BIND IDTPLIT=PLIT(
	0,	ERRLEX,
	"$",	ERRLEX,		! POSITION ONLY REQUIRED
	"&",	ERRLEX,		! #46
	"(",	HPARAOPEN,	! #50
	")",	HPARACLOSE,	! #51
	"*",	HMULT,		! #52
	"+",	HADD,		! #53
	",",	HCOMMA,		! #54
	"-",	HMINUS,		! #55
	"@",	HDOT,		! N.B. @ IS TREATED EXACTLY LIKE .
	".",	HDOT,		! #56
	":",	HCOLON,		! #72
	";",	HSEMICOLON,	! #73
	"<",	HPOINTOPEN,	! #74
	"=",	HEQUAL,		! #75
	">",	HPOINCLOSE	! #76
						);

INCR I FROM 0 TO .IDTPLIT[-1]-2 BY 2 DO
    IDT(.IDTPLIT[.I],
	.IDTPLIT[.I+1]);
END;


BEGIN
EXTERNAL EXCHJLNKG;
BIND DCLEXTPLIT=PLIT(
	LEXCREATE, '$CREA','T',
	LEXEXCHJ,  'EXCHJ', 0,
	LEXMUL,	   'MUL',   0,
	LEXDIV,	   'DIVR',  0,
	LEXMOD,	   'MODR',  0,
	LEXROT,	   'ROTAT','E',
	LEXSHIFT,  'SHIFT', 0,
	LEXBREG,   '$BREG',  0,
	LEXPREV,   '$PREV', 0,
	LXSIGV,	   'SIGVA','L',
	LXSIGR,	   'SIGRE','G',
	LXSIGL,	   '$SIGN','L',
	LXSIG1,	   '$SIGN','1',
	LXENAB,	   '$ENAB','L',
	LXSAV2,	   '$SAV2', 0,
	LXSAV3,	   '$SAV3', 0,
	LXSAV4,	   '$SAV4', 0,
	LXSAV5,	   '$SAV5', 0,
	LXINT612,  'INIT6','12',	! INITIALIZATION CALL TO SIX12
	LXY612,	   'ESIX1','2',		! ENABLE CALL TO SIX12...DO NOT CHANGE THESE NAMES !!!!!
	LXE612,	   'SIX12', 0,		! ROUTINE ENTRY CALL TO SIX12
	LXX612,	   'XSIX1','2',		! ROUTINE EXIT CALL TO SIX12
	LXHLNK,	   '$LINK', 0,
	LXIHLNK,   '$ILIN','K',
	LXHLTB,	   'LINKT','B'	);

INCR I FROM 0 TO .DCLEXTPLIT[-1]-3 BY 3 DO
    .DCLEXTPLIT[.I]_
	DCLEXT(.DCLEXTPLIT[.I+1],.DCLEXTPLIT[.I+2]);
ST[.LEXEXCHJ,LNKGNMF]_.EXCHJLNKG;
END;

BEGIN
EXTERNAL SPEC1LNKG,SPEC2LNKG;
BIND SPCFNPLIT=PLIT(
	LXHALT,	    'HALT',   0,    SPEC2LNKG, 0,
	LXRESET,    'RESET',  0,    SPEC1LNKG, 1,
	LXWAIT,	    'WAIT',   0,    SPEC1LNKG, 2,
	LXNOP,	    'NOP',    0,    SPEC1LNKG, 3,
	LXSWAB,	    'SWAB',   0,    SPEC1LNKG, 4,
	LXCARRY,    'CARRY',  0,    SPEC1LNKG, 5,
	LXOVFLOW,   'OVERF', 'LOW', SPEC1LNKG, 6,
	LXMFPI,	    'MFPI',   0,    SPEC1LNKG, 7,
	LXMFPD,	    'MFPD',   0,    SPEC1LNKG, 8,
	LXMTPI,     'MTPI',   0,    SPEC1LNKG, 9,
	LXMTPD,     'MTPD',   0,    SPEC1LNKG, 10    );

INCR I FROM 0 TO .SPCFNPLIT[-1]-5 BY 5 DO
    BEGIN
    ISTG(.SPCFNPLIT[.I+1],
	 .SPCFNPLIT[.I+2],
	 SPECFUNT,
	 .SPCFNPLIT[.I+4]);
    .SPCFNPLIT[.I]_LEXOUT(BNDVAR,.STE);
    STE[LNKGNMF]_..SPCFNPLIT[.I+3]
    END
END;

	END;
END
END