Article View: alt.folklore.computers
Article #625591Re: something like a 360, was PDP 11/40 system manual
From: Dan Espen
Date: Mon, 13 Aug 2018 15:20
Date: Mon, 13 Aug 2018 15:20
46 lines
3200 bytes
3200 bytes
Peter Flass <peter...@yahoo.com> writes: > Dan Espen <dan1...@gmail.com> wrote: >> John Levine <jo...@taugh.com> writes: >> >>> In article <pkpgkg$grv$1...@dont-email.me>, >>> Dan Espen <dan1...@gmail.com> wrote: >>>> Not really that hard: >>>> >>>> LARL R11,SUB1 R11 <- subroutine address and base >>>> BALR R14,R11 Go to subroutine >>> >>> LARL? No 360 I ever used had that instruction. >> >> Right, the macro for this originally did: >> >> L R11,=A(SUB1) > > But, LARL loads a PC-relative address, but your L generates an ADCON. Both instructions put the address of the subroutine into the register. On older machines a load of an adcon is used because "LA" isn't going to work if the subroutine is more than 4K away from the calling routine. On newer machines LARL is preferred because ADCONS take storage and add to load time. >> But I guessed we were talking S/360 and it's descendants. >> >>> Also, the standard calling sequence put the entry point in R15. >>> Pedantically, >> >> Yes, the code could use R15 but then R15 would have to be loaded >> somewhere else or it would be sure to be destroyed before the subroutine >> got very far. Better to just use some safe register from the beginning. > > As long as you don't call anything that uses standard linkage conventions. Of course. One could use standard linkage for subroutine calls, but it's just not efficient. I don't think any IBM compiler does so. -- Dan Espen
Technical Details
Message-ID:
<pks7k7$jf0$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!c189-v6ni1887ith.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mailReferences:
<21aaeee8-c41a-4442-a4eb-ea6a29b1e4f1@googlegroups.com> <pkmrkc$6lm$1@dont-email.me> <767649820.555764566.888777.peter_flass-yahoo.com@news.eternal-september.org> <pkpgkg$grv$1@dont-email.me> <pkphnb$249o$2@gal.iecc.com> <pkqesi$agc$1@dont-email.me> <1904050189.555850896.599407.peter_flass-yahoo.com@news.eternal-september.org>Show Full Headers
Complete Article Headers
X-Received: by 2002:a6b:3c13:: with SMTP id k19-v6mr7588071iob.13.1534173640569; Mon, 13 Aug 2018 08:20:40 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:a02:b799:: with SMTP id f25-v6ls2873163jam.6.gmail; Mon, 13 Aug 2018 08:20:39 -0700 (PDT) X-Received: by 2002:a02:98bd:: with SMTP id q58-v6mr8499668jaj.13.1534173639760; Mon, 13 Aug 2018 08:20:39 -0700 (PDT) Path: mbox-mo1.pugleaf.net!c189-v6ni1887ith.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!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: something like a 360, was PDP 11/40 system manual Date: Mon, 13 Aug 2018 11:20:38 -0400 Organization: A noiseless patient Spider Lines: 46 Message-ID: <pks7k7$jf0$1@dont-email.me> References: <21aaeee8-c41a-4442-a4eb-ea6a29b1e4f1@googlegroups.com> <pkmrkc$6lm$1@dont-email.me> <767649820.555764566.888777.peter_flass-yahoo.com@news.eternal-september.org> <pkpgkg$grv$1@dont-email.me> <pkphnb$249o$2@gal.iecc.com> <pkqesi$agc$1@dont-email.me> <1904050189.555850896.599407.peter_flass-yahoo.com@news.eternal-september.org> Mime-Version: 1.0 Injection-Info: reader02.eternal-september.org; posting-host="ad1086e223b98a54f3aba8ae6877f52f"; logging-data="19936"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX1/r9w5WqeunemM1/NjL8CmJvQNJFH3mKRw=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:9sL2AqavynO5lYeXRxO6xaiOlAI= Bytes: 2748 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit