Google
 

Trailing-Edge - PDP-10 Archives - AP-4172F-BM - 3a-sources/rg3n.bli
There are 18 other files named rg3n.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:	H3REGI.BLI
!DATE:		14 JANUARY 74	MGM/FLD/KR

%3.43%	GLOBAL BIND H3REV=4;	!MODULE VERSION NUMBER

       
!REVISION HISTORY
!7-15-77   ROUTINE RGINIT IS MODIFIED SO THAT SREG,VREG,FREG,
!          DREGS,RESREGM ARE DEFINED ACCORDING LCG CONVENSION
!          USING /Z SWITCH. THE USER CAN REDEFINE THEM IN MODULE 
!          HEAD.THESE ARE ALSO MADE GLOBAL FOR REL FILE.THIS FUTURE
!          WILL IDENTIFY AND INFORM THE USER AT LINK TIME IF
!          ANY MODULE IS COMPILED WITH DIFFERENT REGISTER
!          CONVENSION.
!






%%
%   THIS SECTION OF DRIVER INITIALIZES THE REGISTER MASKS AND
  COUNTS, NAMELY:

    MODREGM--BIT I ON INDICATES REGISTER I RESERVED BY PROGRAMMER
             OR IS ONE OF THE SPECIAL REGISTERS (VBF OR S);
    RESREGM--BIT I ON INDICATES REGISTER I RESERVED BY PROGRAMMER;
    NOSAVR--COUNT OF DECLARABLE REGISTERS;
    S-, B-, F-, V-REG--THE RUN-TIME SUPPORT REGISTERS.

    THE MODULE DECLARATION ALLOWS USER SETTING OF THESE VARIABLES--
  THE DECLARATIONS ARE DETECTED IN SWITCHER (IN DECLAR.BLI) WHICH
  THEN SIMPLY CALLS ONE OF THE GLOBAL ROUTINES DEFINED BELOW:

    PSWRES--RESERVES USER REGISTERS (SETTING MODREGM ONLY);
    PSWSAV--SETS NOSAVR;
    PSWSPC(I)--DEFINES SPECR(I), ONE OF THE SUPPORT REGISTERS.

    THE MODULE DECLARATION ALSO ALLOWS SETTING OF THE STACK REGISTERS.
  THE GLOBAL MACROS "STKLEN" AND "STKSTE" ARE USED TO GENERATE THE
  CODE FOR THE INITIALIZATION, ALSO DONE IN THIS BLOCK.  THE ROUTINE
  PSWSTK DEFINID BELOW HANDLES USER SPECIFICATION OF THESE.

    THE WINDOW HAS THE SWITCH TABLE POINTER IN "SYM" UPON ENTRY
  TO EACH OF THESE ROUTINES.  EACH ROUTINE RETURNS A VALUE OF 1
  IF THERE WAS A SYNTAX ERROR (AFTER DOING AN "ERROR").  THE MODULE
  THEN TRIES TO RECOVER BY LOOKING FOR A BEGIN.  ALL SEMANTIC ERRORS
  ARE TREATED AS WARNINGS--WE ATTEMPT TO MAKE SYNTACTIC ERRORS
  INTO WARNINGS.
%
%%
GLOBAL ROUTINE RGINIT =
BEGIN
   EXTERNAL ZFLAG,RREG;
  MAP MNAM, ACCUM;
%3.36%  MACRO SPECR(I)=(CASE I OF SET SREG; FREG; VREG TES)$,
        SYNER(X,Y)=(WARNEM(X,Y); RETURN 1)$,
        LDEL=DEL<LEFTHALF>$;

  GLOBAL ROUTINE PSWRES=
    BEGIN
      IF .LDEL NEQ HPAROPEN THEN SYNER(.NDEL,#606);
      DO
        BEGIN
          HRUND(); 
          IF (NOT LITP(.SYM)) OR (LITV(.SYM) GTR 15) OR
             (LITV(.SYM) LSS 0)
            THEN WARNEM(.NSYM,#612)
            ELSE 
              IF (.MODREGM OR .RESREGM)^(-LITV(.SYM))
                THEN WARNEM(.NSYM,ERSMINUSE)
                ELSE RESREGM_.RESREGM OR 1^LITV(.SYM)
        END
        WHILE .LDEL EQL HCOMMA;
      IF .LDEL NEQ HROCLO THEN SYNER(.NDEL,#606) ELSE HRUND();
      0
    END;

  GLOBAL ROUTINE PSWSAV=
    BEGIN
      IF .LDEL NEQ HEQL THEN SYNER(.NDEL,#610);
      HRUND(); 
      IF (NOT LITP(.SYM)) OR (LITV(.SYM) GTR 8) OR
         (LITV(.SYM) LSS 0)
        THEN WARNEM(.NSYM,#641)		! ?DNL
        ELSE NOSVR_LITV(.SYM);
      0
    END;

  GLOBAL ROUTINE PSWSPC(I)=
    BEGIN
      IF .LDEL NEQ HEQL THEN SYNER(.NDEL,ERSYRRINV);
      HRUND(); 
      IF (IF (NOT LITP(.SYM)) 
            THEN 1
            ELSE (LITV(.SYM) GTR 15) OR
                 (LITV(.SYM) LSS (.I NEQ 0)) )
        THEN WARNEM(.NSYM,ERSMSPRINV)
        ELSE
          IF (.MODREGM OR .RESREGM)^(-LITV(.SYM))
            THEN WARNEM(.NSYM,#642)	! ?SRN
            ELSE (MODRE