* Name:
*	MENU system assembly support routines


* Function:
*	Setexit and reset are used in signal processing.
*	Setexit stores its registers.  When reset
*	is called, it loades the saved registers, and hence
*	returns to the point after where setexit was called.
*	Note that, when reset is caled, register variables
*	inside the program calling
*	setexit will be reset to the values they had when setexit
*	was called.
*	reset will also set the global variable answer to point
*	to a null string.  This is done to stop multi-level menu
*	junping commands from acting strange.

* History:
*	Written for Perkin-Elmer May 1982 by Len Reed.
*	Updated 8/19/82 by LR to set *answer to NULL


	entry	setexit,reset
	extrn	answer		global datum in main program
r0	equ	0
r3	equ	3
rf	equ	15
	dc      c'"%W% %H%"'
	pure
setexit	equ	*
	stm	r0,sregs	 save all registers
	br	rf		 return to caller

reset	equ	*
	la	r3,zero		set answer = ""
	st	r3,answer
	lm	r0,sregs	 restore registers
	br	rf		 note return via new rf

zero	dc	h'0'

	impur
sregs	dsf	16		 register save area
