;--------------------------------------
; TABSIZE	4
; (c)1993-1997 Vassilis Papathanassiou
;--------------------------------------
	IMPORT	TRAPflg
	EXPORT	SetCritic
;--------------------------------------
SetCritic:
	movem.l		D2/A2,-(A7)
	move.l		#-1,-(A7)
	move.w		#$101,-(A7)
	move.w		#5,-(A7) 	;Setexc
	trap		#13
	addq.l		#8,A7
	move.l		D0,Sevt_critic
	pea		Myevt_critic
	move.w		#$101,-(A7)
	move.w		#5,-(A7)
	trap		#13
	addq.l		#8,A7
	movem.l		(A7)+,D2/A2
	rts
;-------------------------------------
	dc.b		'XBRABNeT'
Sevt_critic:
	dc.l		0
Myevt_critic:
	tst.w		TRAPflg
	beq.s		RetSysCr
	move.w		4(A7),D0	;thanks for the error code
	ext.l		D0
	rts

RetSysCr:
	move.l	Sevt_critic,-(A7)
	rts
; ========= END VECTORS INST =========
	END
