Deutsch English Français Italiano |
<0fc3c59c108cdc64cf6336bcc3cd3790@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: mitchalsup@aol.com (MitchAlsup1) Newsgroups: comp.arch Subject: Re: branch address architecture, not interactive use, The Design of Design Date: Sat, 25 May 2024 20:29:20 +0000 Organization: Rocksolid Light Message-ID: <0fc3c59c108cdc64cf6336bcc3cd3790@www.novabbs.org> References: <v03uh5$gbd5$1@dont-email.me> <v1tsdv$3lk1j$1@dont-email.me> <v1ttqr$2095$1@gal.iecc.com> <af14e2384ff1a4a23ed1837c276da87c@www.novabbs.org> <v1uk2q$2gcf$1@gal.iecc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="2216674"; mail-complaints-to="usenet@i2pn2.org"; posting-account="65wTazMNTleAJDh/pRqmKE7ADni/0wesT78+pyiDW8A"; User-Agent: Rocksolid Light X-Spam-Checker-Version: SpamAssassin 4.0.0 X-Rslight-Site: $2y$10$o3CVGpu..ow.6UICfpP7De.LdRk15tJWvDq4kOAJ31XCHkNbjLDQe X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8 Bytes: 2171 Lines: 26 John Levine wrote: > According to MitchAlsup1 <mitchalsup@aol.com>: >> 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. The kinds of co-routines this is perfect for are those where each co- routine is not reentrant so they can use their own data n their own memory to control their own state transition. One accesses these variables disp(PC)+ addressing. {almost as free as registers containing those values {It was PDP-11 era...} I use this extensively in a RSTS controller applications. But no-one would use co-routines this way with all our "accumulated" knowledge of how to write small simple efficient software these days.