; Unterroutinen zu env.c
; @(#)envsub.s, (c) 01.04.1990 jr

text

globl install, myenv

	dc.b	"XBRAGENV"
oldv:
	dc.l	0
newv:
	move.l	4(sp), a0	; Stackpointer
	move.l	#myenv, $2c(a0)	; neues Environment eintragen
	move.l	oldv, a0	; durch alten Vektor springen
	jmp(a0)

install:
	movem.l	d0-d7/a0-a6, -(sp)	; Register retten
	move.l	$4fe, oldv	; neuen Vektor installieren
	move.l	#newv, $4fe
	movem.l	(sp)+, d0-d7/a0-a6
	rts

end
