Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/abort.mac
There is 1 other file named abort.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,abort);
PROCEDURE abort(message);
	VALUE message; TEXT message;
COMMENT If message=/=NOTEXT, it is written on SYSOUT (and on the TTY if SYSOUT
is not the TTY).
Then SIMDDT is entered via the ZYQ213 error message.;
!*;! MACRO-10 code !*;!

	TITLE	abort
	ENTRY	abort
	SUBTTL	SIMULA utility, Lars Enderin Jan 1976

;!*** Copyright 1976 by the Swedish Defence Research Institute. ***
;!*** Copying is allowed.					***


	sall
	search	simmac,simmcr,simrpa
	macinit

	;! Local definitions ;!

	message==XWAC1

abort:	PROC
	IF	;! message=/=NOTEXT
		JUMPE	message,FALSE
	THEN	;! Type it and possibly print it on SYSOUT
		CLEARO
		OUTSTR	crmsg
		SETZ
		LF	X1,ZTELEN(XWAC1)
		ADDI	X1,(XWAC1)
		EXCH	(X1)	;! Null word at end temporarily
		OUTSTR	2(XWAC1)
		EXCH	(X1)	;! Restore
		LOWADR
		L	X1,YSYSOUT(XLOW)
		IF	;! Sysout =/= TTY
			IFON	ZFITA(X1)
			GOTO	FALSE
		THEN	;! Output also on SYSOUT
			LD	XWAC5,XWAC1
			L	XWAC1,X1
			EXEC	IOOG
			LD	XWAC3,msghd
			EXEC	IOOT	;! Outtext (msghd)
			LD	XWAC3,XWAC5
			EXEC	IOOT
			EXEC	IOOG
	FI	FI
	RTSERR	213
	RETURN
	EPROC

msghd:	XWD	0,msg-2
	XWD	lmsg,0
crmsg:	ASCII	"   
"
msg:	ASCIZ	"MESSAGE: "
	lmsg==9	;! Length of "MESSAGE: "
	LIT
	END;