Google
 

Trailing-Edge - PDP-10 Archives - LCG_Integration_Tools_Clearinghouse_T20_v7_30Apr86 - tools/dumper2/errorm.mar
There are 3 other files named errorm.mar in the archive. Click here to see a list.
	.TITLE	ERRORM		Error message reporting tool
;+
;	This routine simplifies the reporting of errors
;	by taking a single argument (the error number) and
;	using $PUTMSG to deliver it to the user.  No checking
;	of any kind is done and the routine is re-entrant.
;-
	.ENTRY	ERRORM,0
;+
;	Allocate the storage on the stack for the message
;	vector.  Since this will be a singularly stupid routine,
;	the message vector will always be 8 bytes (flags=0,
;	arg count=1, and message number as supplied).
;-
	MOVZBL		(AP),R0
	SOBGTR		R0,HAVEARGS		; FAO arguments supplied
	BRB		NOARGS
;
HAVEARGS:
	ASHL		#2,R0,R1
	ADDL2		#12,R1
	SUBL2		R1,SP
	ASHL		#-2,R1,(SP)
	MOVW		#0,2(SP)
	MOVL		@4(AP),4(SP)
	MOVL		R0,8(SP)
	MOVAL		8(AP),R1
	MOVAL		12(SP),R2
FAOL:
	MOVL		(R1)+,(R2)+
	SOBGTR		R0,FAOL
	BRB		PM
;
NOARGS:
	SUBL2		#8,SP
	MOVW		#1,(SP)
	MOVW		#0,2(SP)
	MOVL		@4(AP),4(SP)
PM:
	MOVL		SP,R0
	$PUTMSG_S	(R0),,
	RET
;
	.END