Article View: alt.folklore.computers
Article #625594Re: PDP 11/40 system manual
From: Peter Flass
Date: Sun, 12 Aug 2018 20:09
Date: Sun, 12 Aug 2018 20:09
58 lines
3748 bytes
3748 bytes
Dan Espen <dan1...@gmail.com> wrote: > Peter Flass <peter...@yahoo.com> writes: > >> Dan Espen <dan1...@gmail.com> wrote: >>> I've done huge amounts of assembly programming and the instructions >>> get the job done. Issues with the base registers are easy to deal with >>> once you figure out that each subroutine should have it's own base >>> register, don't attempt to make all code addressible at once. >>> >> >> My copy of Pugh is packed, but I think this was the intention. 4K can be a >> bit small for a subroutine, but I think the designers expected programmers >> to divide their programs into smallish subroutines. I don't think I've >> written a lot of programs that needed multiple base registers. On the other >> hand it's more complicated than it needs to be to save a base register and >> load a new one - especially if you want to write reentrant code, where the >> recommended technique requires OS intervention to get a free the savearea. >> A hardware stack would have helped. and maybe one instruction to push a >> register and load it with the address of the next instruction. > > Not really that hard: > > LARL R11,SUB1 R11 <- subroutine address and base > BALR R14,R11 Go to subroutine > > ... > > SUB1 DS 0H > USING R11,* > STM R2,R14,SUB1_SAVE > do something > LM R2,R14,SUB1_SAVE > BR R14 > DROP R11 > > Of course, there are always macros for the LARL/BALR and subroutine > entry and exit so it looks like: > > XBAL SUB1 > > ... > > SUB1 ENT > do something > LEAVE > > The macros push the subroutine name > into a macro array for later automatic save area generation. > > I'm never clear on what happens when you exceed > the limits of a hardware stack. > Sure, now you have LARL. You can also preallocate a largeish storage area as a stack to grab saveareas off, to avoid GETMAIN/FREEMAIN. -- Pete
Technical Details
Message-ID:
<997178083.555797132.949481.peter_flass-yahoo.com@news.eternal-september.org>Path:
mbox-mo1.pugleaf.net!a22-v6ni10460wmg.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!feeder4.usenet.farm!feed.usenet.farm!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mailReferences:
<21aaeee8-c41a-4442-a4eb-ea6a29b1e4f1@googlegroups.com> <0001HW.211B94B1040CADA5700004B5B2CF@news.giganews.com> <mdd7ekzl6pr.fsf@panix5.panix.com> <pki8ae$ca0$1@dont-email.me> <mddh8k2vyfh.fsf@panix5.panix.com> <pkmrkc$6lm$1@dont-email.me> <767649820.555764566.888777.peter_flass-yahoo.com@news.eternal-september.org> <pkpgkg$grv$1@dont-email.me>Show Full Headers
Complete Article Headers
X-Received: by 2002:a1c:200f:: with SMTP id g15-v6mr1132357wmg.1.1534104565130; Sun, 12 Aug 2018 13:09:25 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:a1c:4d05:: with SMTP id o5-v6ls1716391wmh.12.gmail; Sun, 12 Aug 2018 13:09:23 -0700 (PDT) X-Received: by 2002:a7b:c045:: with SMTP id u5-v6mr983792wmc.13.1534104563831; Sun, 12 Aug 2018 13:09:23 -0700 (PDT) Path: mbox-mo1.pugleaf.net!a22-v6ni10460wmg.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!feeder4.usenet.farm!feed.usenet.farm!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Peter Flass <peter...@yahoo.com> Newsgroups: alt.folklore.computers Subject: Re: PDP 11/40 system manual Date: Sun, 12 Aug 2018 16:09:23 -0400 Organization: A noiseless patient Spider Lines: 58 Message-ID: <997178083.555797132.949481.peter_flass-yahoo.com@news.eternal-september.org> References: <21aaeee8-c41a-4442-a4eb-ea6a29b1e4f1@googlegroups.com> <0001HW.211B94B1040CADA5700004B5B2CF@news.giganews.com> <mdd7ekzl6pr.fsf@panix5.panix.com> <pki8ae$ca0$1@dont-email.me> <mddh8k2vyfh.fsf@panix5.panix.com> <pkmrkc$6lm$1@dont-email.me> <767649820.555764566.888777.peter_flass-yahoo.com@news.eternal-september.org> <pkpgkg$grv$1@dont-email.me> Mime-Version: 1.0 Injection-Info: reader02.eternal-september.org; posting-host="c434ae82c98b76a68e612bc442a5ce12"; logging-data="14401"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX1/NEoVi5/ZCalOlZK45uSIt" User-Agent: NewsTap/5.3.1 (iPad) Cancel-Lock: sha1:JzmwvQGBAoPljTQ6YzdkWD2/Ao4= sha1:o/P2hGCujyA86+3BnsG9g4uVuoE= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit