Google
 

Trailing-Edge - PDP-10 Archives - AP-4172F-BM - 3a-sources/h3cntr.bli
There are 18 other files named h3cntr.bli in the archive. Click here to see a list.
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
!
!COPYRIGHT (C) 1972,1973,1974,1977,1978 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 01754
!FILENAME:	H3CNTR.BLI
!DATE:		14 JANUARY 74	MGM/FLD/KR

%3.43%	GLOBAL BIND H3CNV=6;	!MODULE VERSION NUMBER



GLOBAL ROUTINE CNINIT =
  BEGIN
  MAP MNAM, ACCUM;
  MACRO SYNER(X,Y)=(WARNEM(X,Y); RETURN 1)$,
         LDEL=DEL<LEFTHALF>$;
  MACRO	STTSTE=STKSTE(.P)$,
	STTLEN=STKLEN(.P)$,
	FNS=FNSTAT[.P]$;
%%
%
    "PSWSTK" IS CALLED BY THE SWITCH DECLARATION ROUTINE WHEN
    IT HAS RECOGNIZED "STACK" IN THE ARGUMENT STRING.  NOTE
    COMMUNICATION VIA "FNS" (NORMALLY NOT USED THIS WAY).
    A STACK IS GENERATED ONLY WHEN THE LENGTH IS NON ZERO.  
%
%%
FORWARD PSWSTT;
GLOBAL ROUTINE PSWSTK=
BEGIN
	IF PSWSTT(0) THEN 1 ELSE
	    BEGIN
		LSTART_1;
		IF .ST[.STKSTE(0),0]<TYPEF> EQL UNDEDT THEN 
			SYNER(.NSYM,ERSYSTKINV) ELSE 0
	    END
END;

%%
%
	"PSWTIM" IS CALLED BYY THE SWITCH DECLARATION ROUTINE
	WHEN A TIMER ROUTINE IS DECLARED.
%
%%
GLOBAL ROUTINE PSWTIM=
BEGIN
	IF PSWSTT(1) THEN 1 ELSE
	    BEGIN
		IF .ST[.TIMSTE,0]<TYPEF> EQL GLOBALT
		    OR .ST[.TIMSTE,0]<TYPEF> EQL OWNT  THEN
			SYNER(.NSYM,ERSYSTKINV) ELSE 0
	    END
END;
  GLOBAL ROUTINE PSWSTT(P)=
%%
%
	ROUTINE "PSWSTT" IS CALLED BY "PSWSTK" OR "PSWTIM" TO
	DECLARE A STACK OR A TIMER.  DEFAULTS ARE 'STACK' FOR
	STACK NAME, 'OWN' FOR STACK TYPE; 'TIMER' FOR
	TIMER ROUTINE, 'EXTERNAL' FOR ROUTINE TYPE.

	P = 0 => STACK DECLARATION
	P = 1 => TIMER ROUTINE DECLARATION
%
%%
    BEGIN
	BIND DEFNAME=.(PLIT('STACK','TIMER')[.P]);
	BIND DEFL=IF .P THEN DEFAULTTIML ELSE DEFAULTSTKL;
      LOCAL DECLTYPE;
      IF .LDEL EQL HCOMMA OR .LDEL EQL HPAROPEN OR .LDEL EQL HROCLO
        THEN %WE NEED AN STE OF TYPE OWN FOR STACK OR EXTERNAL FOR TIMER%

          BEGIN
            ACCUM[0]_DEFNAME; ACCUM[1]_-2;
            STTSTE_STINSERT(UNDEDT^TYPEFP+LSM,0);
            IF .LDEL EQL HPAROPEN
              THEN
                (HRUND(); EXPRESSION(1);
                 IF NOT LITP(.FUTSYM)
                   THEN (WARNEM(.NSYM,ERSMINSTKL);
                         STTLEN_DEFL)