Path: ...!news.iecc.com!.POSTED.news.iecc.com!not-for-mail From: John Levine Newsgroups: comp.arch Subject: Re: branch address architecture, not interactive use, The Design of Design Date: Tue, 14 May 2024 02:59:38 -0000 (UTC) Organization: Taughannock Networks Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 14 May 2024 02:59:38 -0000 (UTC) Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="82319"; mail-complaints-to="abuse@iecc.com" In-Reply-To: Cleverness: some X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: johnl@iecc.com (John Levine) Bytes: 1787 Lines: 17 According to MitchAlsup1 : > JSR PC,@(SP)+ > >Popped the return address off the stack, pushed another return address on >the stack and transfers control. This is how we did coroutines. When I was teaching an operating system class in about 1977 I challenged the class to come up with a minimal coroutine package. They all found that pretty quickly. It's not very good coroutines since it just switches the return address, not any other stack context, but it can sometimes be useful. -- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly