Trailing-Edge
-
PDP-10 Archives
-
AP-D480B-SB_1978
-
unend.bli
There are 12 other files named unend.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) 1973,1977 BY DIGITAL EQUIPMENT CORPORATION
!AUTHOR: D. B. TOLMAN
MODULE UNEND (RESERVE(0,1,2,3),SREG=#17,FREG=#16,VREG=#15,DREGS=4,GLOROUTINES)=
BEGIN
GLOBAL BIND UNENV = 2^24+0^18+3; !VERSION DATE: 1-AUG-1974
%(
REVISION HISTORY
1 ----- ----- FIX CREFIT TO CREF INCLUDED FILES EVEN IF THEY
ARE NOT LISTED
LOWER THE VERBOSITY LEVEL OF ERRORLESS PROGRAMS
2 ----- ----- PUT [NO ERRORS DETECTED] ON LISTING BUT NOT TTY
3 ----- ----- CREF - CHANGE ^G TO ^Q SO VERSION 51 WILL RUN
)%
REQUIRE FIRST.BLI;
FORWARD
ZZOUTMSG,
ENDUNIT,
CREFIT;
GLOBAL ROUTINE
ENDUNIT =
BEGIN
%OUTPUT THE MESSGES AT THE END OF THE PROGRAM UNIT%
REGISTER T1,T2;
EXTERNAL JOBERR,DIGITS,CCLSW,NUMWARN,NUMFATL,HEADPTR,STRNGOUT;
BEGIN %CROSS REFERENCE END OF PROGRAM SYMBOL %
EXTERNAL CREFIT;
BIND ENDSUBR = 5;
IF .FLGREG<CROSSREF> THEN CREFIT( ENDSUBR)
END;
IF .CCLSW EQL 0 OR .NUMFATL NEQ 0 OR NUMWARN NEQ 0
THEN
BEGIN
LOCAL STRN[6];
EXTERNAL PROGNAME,HEADPTR,BASENO;
BASENO _ 10; !FOR DIGITS()
T1 _ STRN[2]<36,7>;
STRN[3] _ ' '; !<BLANK><TAB>
T2 _ PROGNAME<36,6>;
DECR I FROM 5 TO 0 DO
REPLACEI ( T1, SCANI(T2)+#40 ) ;
IF .NUMFATL NEQ 0 OR .NUMWARN NEQ 0
THEN
BEGIN
ZZOUTMSG(PLIT'?M?J');
IF .NUMFATL EQL 0
THEN
BEGIN
STRN[0] _ '%FTNW';
STRN[1] _ 'RN ';
STRN[3] _ .STRN[3] + '?0?0NO'
END
ELSE
BEGIN
STRN[0] _ '??FTNF';
STRN[1] _ 'TL ';
JOBERR<RIGHT>_.JOBERR<RIGHT>+.NUMFATL;
FLGREG<FATALERR> _ -1;
HEADPTR _ STRN[3]<22,7>; !INITIAL POINTER
DIGITS(.NUMFATL);
REPLACEI( HEADPTR,0);
END;
ZZOUTMSG ( STRN<0,0> );
ZZOUTMSG(PLIT' FATAL ERRORS AND ?0');
IF .NUMWARN EQL 0
THEN STRN[0] _ 'NO'
ELSE
BEGIN
FLGREG<WARNGERR> _ 1;
HEADPTR _ STRN<36,7>;
DIGITS(.NUMWARN);
REPLACEI(HEADPTR,0)
END;
ZZOUTMSG ( STRN<0,0> );
ZZOUTMSG(PLIT' WARNINGS?M?J?0');
END
ELSE
BEGIN
%CRLF FOR THE END OF LISTING%
IF .FLGREG<LISTING> THEN STRNGOUT(PLIT'?M?J');
ZZOUTMSG(STRN[2]<0,0>);
IF .FLGREG<LISTING> THEN STRNGOUT(PLIT'[ NO ERRORS DETECTED ]?0');
ZZOUTMSG(PLIT'?M?J');
END
END;
END;
GLOBAL ROUTINE
CREFIT ( SYM, TYPE ) =
BEGIN
% THIS ROUTINE WILL OUTPUT THE CREF INFORMATION INTO THE
LISTING FILE.
TYPE - TYPE OF THE SYMBOL
SYM - THE SYMBOL
(SYM IS OPTIONAL DEPENDING UPON TYPE )
%
EXTERNAL CHAROUT,HEADPTR,STRNGOUT,ENTRY,DIGITS,STRNG6,BASENO,NUMODIG;
EXTERNAL SAVFLG; !SAVE OF INCLUDE FILE FLGREG
MAP BASE SYM;
BIND RUBOUT = #177;
OWN CREFBUF[3]; !USED TO BUILD UP THE CREF STRING
MACRO
NXT(X) = REPLACEI ( HEADPTR, X ) $,
COUNT = CREFBUF<8,7> $, !SYMBOL CHARACTER COUNT FIELD
ENDOFCREF = NXT(RUBOUT);NXT("D");NXT(0) $; ! TERMINATING CHARACTER SEQUENCE FOR CREF INFO
BIND
SYMDF = 0, !SYMBOL DEFINITION
SYMRF = 1, !SYMBOL REFERENCE
LINNE = 2, !LINE NUMBER
LABDF = 3, !LABEL DEFINITION
LABRF = 4, !LABEL REFERENCE
ENDSUBR = 5; !END OF PROGRAM UNIT
BIND
SYMBL = '?0B?A' + RUBOUT^29, !BEGINNING OF SYMBOL DEFINITION
LINNUM = '?0B?O' + RUBOUT^29, !BEGINNING OF LINE NUMBER DEFINTION
DEFND="?B"; !SYMBOL INDICATING DEFINITION
IF NOT .FLGREG<LISTING>
THEN IF NOT .FLGREG<ININCLUD> OR NOT .SAVFLG<LISTING>
THEN RETURN;
IF .TYPE EQL ENDSUBR
THEN
STRNGOUT ( PLIT('?0E?0' + RUBOUT^29) )
ELSE
%THERE IS SOME SORT OF SYMBOL TO BE OUTPUT %
BEGIN
HEADPTR _ CREFBUF<8,7>; !FIRST CHARACTER POS
BASENO _ 10; !DIGITS BASE
NUMODIG _ 0; !DIGITS RETURN
CREFBUF[0] _ SYMBL;
CASE .TYPE OF SET
%SYMDF%BEGIN
%SYMBOL DEFINITON / SETTING %
COUNT _ STRNG6(.SYM[IDSYMBOL]);
NXT(DEFND)
END;
%SYMRF%BEGIN
%SYMBOL REFERENCE%
COUNT _ STRNG6( .SYM[IDSYMBOL] )
END;
%LINNE%BEGIN
%STATEMENT LINE NUMBER FOR FOLLOWING REFS%
CREFBUF[0] _ LINNUM;
DIGITS ( .SYM );
COUNT _ .NUMODIG;
END;
%LABDF%BEGIN
%STATEMENT LABEL DEFINITION %
DIGITS ( .SYM );
COUNT _ .NUMODIG + 1;
NXT("P");
NXT(DEFND)
END;
%LABRF%BEGIN
%STATEMENT LABEL REFERENCE%
DIGITS(.SYM);
COUNT _ .NUMODIG + 1;
NXT("P")
END
TES;
ENDOFCREF;
STRNGOUT ( CREFBUF<0,0>)
END
END; %CREFIT%
GLOBAL ROUTINE
ZZOUTMSG(PTR)=
BEGIN
% THIS ROUTINE IS USED TO OUTPUT NON-STANDARD ERROR MESSAGES APPROPRIATELY %
EXTERNAL STRNGOUT;
MACHOP OUTTTY = #051;
% CLEAR ANY LEADING ZEROS %
LABEL NOZERO;
REGISTER T1;
T1_(.PTR)<36,7>;
NOZERO:DECR I FROM 3 TO 0
DO IF SCANI(T1) NEQ "0"
THEN LEAVE NOZERO
ELSE REPLACEN ( T1, " ") ;
IF NOT .FLGREG<TTYDEV> AND NOT .FLGREG<NOERRORS>
THEN OUTTTY(3,PTR,0,1); !O/P TO TTY
IF .FLGREG<LISTING> THEN STRNGOUT(.PTR);
.VREG
END;
END
ELUDOM