Google
 

Trailing-Edge - PDP-10 Archives - FORTRAN-10_V7wLink_Feb83 - forxit.mac
There are 13 other files named forxit.mac in the archive. Click here to see a list.

	SEARCH	FORPRM
	TV	FORXIT  NORMAL AND ERROR EXIT,7(3256)

;COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1981, 1983

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
;TRANSFERRED.

;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
;AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.

;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

COMMENT \

***** Begin Revision History *****

1464	DAW	14-May-81
	Error messages.

1523	JLC	03-Jul-81
	Quiet exit flag, set via a FOROP call.

1571	DAW	31-Jul-81
	Set F to I.FLAGS at %ABORT.

1656	DAW	2-Sep-81
	Get rid of magic numbers.

1760	JLC	5-Oct-81	Q10-6522
	Changed elapsed time calc to use system uptime instead of
	time of day.

2007	JLC	16-Oct-81
	Fix runtime and elapsed time calcs.

2012	JLC	19-Oct-81
	Changed elapsed time calcs yet again.

2025	JLC	26-Oct-81
	Fixed elasped time calcs on -10 yet again.

***** Begin Version 6A *****

2040	DAW	21-Dec-81
	Fix elapsed time calculation for TOPS-10, wrong after
	system uptime becomes greater than about 160 hours.

***** Begin Version 7 *****

3035	JLC	5-Feb-82
	FOROT6 becomes FOROT7. Eliminate extra CRLF output at EOJ since
	it is now done at CLOSE of TTY.

3056	JLC	23-Mar-82
	Remove call to %FSAVE, change error table names, close all
	open files on exit.

3122	JLC	28-May-82
	Moved error summary text here.

3125	JLC	3-Jun-82
	Move the AC save routine to the hiseg.

3136	JLC	26-Jun-82
	Added summary line for non-ANSI usage warnings.

3150	JLC	13-Jul-82
	Fix new summary messages, were in wrong place in table,
	and never got output anyway.

3165	JLC	28-Aug-82
	Fixed output of summary messages again, to avoid
	printing of spurious numbers which have no summary text,
	notably EOF.

3167	JLC	1-Sep-82
	Added summary message for bounds check warnings.

3172	JLC	2-Sep-82
	Change name of summary message.

3212	JLC	11-Nov-82
	Fix ABORT so it doesn't drift through a SIXBIT name.

3250	JLC	7-Jan-83
	Add more messages to summary.

3252	JLC	12-Jan-83
	Added FENTRY.

3256	JLC	14-Jan-83
	Added some null summary texts at the end of the error table,
	since it expanded.

***** End Revision History *****

\

	FSRCH
	SEGMENT	CODE

	ENTRY	EXIT%,%ABORT,ABORT%
	EXTERN	%TRACX,%EXIT1,%ERRCT,%ERRSZ,%SAVAC
	EXTERN	I.RUNTM,I.DAYTM
	EXTERN	%CRLF,%TRPDP
	EXTERN	%QUIET,%ABFLG

	FENTRY	(ABORT)
	MOVEM	P,%TRPDP	;SAVE USER'S PDP AS TRACE PDP

%ABORT:	SKIPE	%ABFLG		;WERE WE ABORTING OR EXITING?
	 POPJ	P,		;YES. DON'T DO IT AGAIN
	SETZ	F,		;CLEAR FLAG WORD
	PUSHJ	P,%TRACX	;TYPE TRACEBACK
	JRST	EXITF

	FENTRY	(EXIT)
	PUSHJ	P,%SAVAC	;SAVE USER'S ACS (FOR ERRORS ONLY)
EXITF:	SETOM	%ABFLG		;SET THE ABORT FLAG TO PREVENT
				;RECURSIVE CALLS TO EXIT1
	PUSHJ	P,%EXIT1	;CLOSE ALL FILES AND CLEAN UP

	SKIPE	%QUIET		;QUIET EXIT DESIRED?
	 JRST	QUIXIT		;YES. BUT DON'T SKIP ERROR TYPOUT

IF20,<
	MOVEI	T1,.FHSLF	;GET RUNTIME
	RUNTM%
	SUBM	T1,I.RUNTM	;SUBTRACT INITIAL RUNTIME, GIVING USED RUNTIME
	TIME%			;GET CURRENT UPTIME IN MILLISECS
	SUB	T1,I.DAYTM	;GET DIFFERENCE
>;END IF20

IF10,<
	SETZ	T1,		;GET RUNTIME
	RUNTIM	T1,
	SUBM	T1,I.RUNTM	;SUBTRACT INITIAL RUNTIME, GIVING USED RUNTIME
	MOVE	T1,[%CNSUP]	;GET UPTIME IN JIFFIES
	GETTAB	T1,
	  SETZ	T1,
	SUB	T1,I.DAYTM	;GET ELAPSED TIME IN JIFFIES
	MULI	T1,^D1000	;GET ELAPSED TIME IN JIFFIES*1000
	MOVE	T3,[%CNTIC]	;GET JIFFIES/SEC
	GETTAB	T3,
	 MOVEI	T3,^D60		;USE 60 IF NOT THERE
	LSH	T3,-1		;DIVIDE BY 2 FOR ROUNDING (A NIT)
	ADDI	T2,(T3)		;[2040] ROUND UP
	LSH	T3,1		;GET JIFFIES/SEC BACK AGAIN
	DIVI	T1,(T3)		;GET UPTIME IN MILLISECS
>;END IF10

	
;	ERR	(TIM,,CPU time $Y   Elapsed time $Y,<I.RUNTM,T1>)
	$ECALL	TIM		;Print CPU time
;TYPE APR ERROR SUMMARY

QUIXIT:	MOVSI	T1,-%ERRSZ	;SET TO GO THROUGH TABLE AGAIN
SUMLP:	SKIPN	T2,%ERRCT(T1)	;GET ERROR COUNT
	  JRST	SUMNXT		;ZERO, GO TO NEXT
	MOVEI	T3,[0]		;ASSUME NOT PLURAL
	CAIE	T2,1		;SINGLE ERROR?
	  MOVEI	T3,[ASCIZ /s/]	;NO, PUT -S ON END OF TEXT
	SKIPE	T4,%ERRTXT(T1)	;Get address of string to print
;	ERR	(SUM,,$D$3T$A$A,<T2,T1,T3>)
	$ECALL	SUM
SUMNXT:	AOBJN	T1,SUMLP	;TYPE WHOLE TABLE

IF20,<
	MOVNI	T1,1		;CLOSE ALL FILES
	CLOSF%
	HALTF%			;QUIT
	JRST	.-1		;AND STAY THAT WAY
>

IF10,<
	EXIT			;QUIT AND STAY THAT WAY
>

%ERRTXT:
	[ASCIZ /Integer overflow/]		;0 - APR trap: 000
	[ASCIZ /Integer divide check/]		;1 - APR trap: 001  NDV
	[ASCIZ /Input integer overflow/]	;2 - FLIRT warning
	[ASCIZ /Input floating overflow/]	;3 - FLIRT warning
	[ASCIZ /Floating overflow/]		;4 - APR trap: 100  FXO
	[ASCIZ /Floating divide check/]		;5 - APR trap: 101  FXO,NDV
	[ASCIZ /Floating underflow/]		;6 - APR trap: 110  FXO,FXU
	[ASCIZ /Input floating underflow/]	;7 - FLIRT warning
	[ASCIZ /Library routine error/]		;8 - MATHLIB error
	[ASCIZ /Output conversion error/]	;9 - Output field width overflow
REPEAT ^D11,<0>					;10-20 reserved for MATHLIB
	[ASCIZ /FORLIB library routine error/]	;21 - FORLIB errors
	[ASCIZ &non-standard I/O usage warning&] ;22 - I/O warnings
	[ASCIZ /Bounds check warning/]		;23 - array and string bounds
	0					;24 - ?EOF
	0					;25 - ?record errors
	[ASCIZ &OPEN/CLOSE warning&]		;26 - OPEN and CLOSE warnings
	0					;27 - unused
	0					;28 - ?CLOSE errors
	0					;29 - unused
	0					;30 - ?OPEN errors

	END