Article View: alt.folklore.computers
Article #625587Re: PDP 11/40 system manual
From: Dan Espen
Date: Sun, 12 Aug 2018 14:35
Date: Sun, 12 Aug 2018 14:35
53 lines
3355 bytes
3355 bytes
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. -- Dan Espen
Technical Details
Message-ID:
<pkpgkg$grv$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!g5-v6ni2779iti.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!feeder4.news.weretis.net!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>Show Full Headers
Complete Article Headers
X-Received: by 2002:a24:328e:: with SMTP id j136-v6mr4865879ita.26.1534084562075; Sun, 12 Aug 2018 07:36:02 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:a6b:fa11:: with SMTP id p17-v6ls2415967ioh.1.gmail; Sun, 12 Aug 2018 07:36:01 -0700 (PDT) X-Received: by 2002:a6b:19c1:: with SMTP id 184-v6mr6338839ioz.66.1534084561391; Sun, 12 Aug 2018 07:36:01 -0700 (PDT) Path: mbox-mo1.pugleaf.net!g5-v6ni2779iti.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Dan Espen <dan1...@gmail.com> Newsgroups: alt.folklore.computers Subject: Re: PDP 11/40 system manual Date: Sun, 12 Aug 2018 10:35:58 -0400 Organization: A noiseless patient Spider Lines: 53 Message-ID: <pkpgkg$grv$1@dont-email.me> 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> Mime-Version: 1.0 Injection-Info: reader02.eternal-september.org; posting-host="f85887c92775115f6aec8b33b69cda43"; logging-data="17279"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX19H9UAtTKdeIhGyt8gdss7QHzFvwwPLgD0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:vyulPtgx7Um3M8WPZQ3BdsDf4fQ= Bytes: 2921 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit