Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.arch Subject: Re: JSR Message-ID: <7391@elsie.UUCP> Date: Tue, 21-Apr-87 20:02:06 EST Article-I.D.: elsie.7391 Posted: Tue Apr 21 20:02:06 1987 Date-Received: Wed, 22-Apr-87 06:15:18 EST References: <12884@watnot.UUCP> <1061@aw.sei.cmu.edu> <1070@osiris.UUCP> Organization: NIH-LEC, Bethesda, MD Lines: 18 > . . .the PDP-11 JSR instruction allows you to specify *any* of the eight > "GPRs" to hold the current PC contents, after pushing the old value of the > specified register onto the stack. (Among other purposes, this was used. . . > for passing the address of an in-line FORTRAN parameter address block. . . Yet another purpose: if you wanted to push register r0 onto the stack without changing the processor status word (as low-level interrupt handlers were wont to do), then instead of using the instruction mov r0,-(sp) you could use the instruction jsr r0,(pc) to turn the trick. You did clobber register zero--but you had just saved it away, yes? -- "We must choose: the stars or the starving. Which shall it be?" UUCP: ..seismo!elsie!ado ARPA: elsie!ado@seismo.CSS.GOV Elsie and Ado are trademarks of Borden, Inc. and Ampex.