From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Thread: 1164f8,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Thread: ffc31,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidd180ab3bd8,gidf4c4f7386e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!fu-berlin.de!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Thu, 26 May 2011 16:39:48 -0400 From: "Jerome H. Fine" Organization: Just Sufficient User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: alt.sys.pdp11,comp.sys.dec,vmsnet.pdp-11 Subject: Re: Y3K for PDP-11 Operating Systems References: <4d99c3b6$0$23756$14726298@news.sunsite.dk> <93vbcaF3luU1@mid.individual.net> <940bm5Fcc3U1@mid.individual.net> <941ob1Fre1U1@mid.individual.net> <9425gcFhnpU1@mid.individual.net> <942hghFhukU1@mid.individual.net> <944mhrF19qU1@mid.individual.net> In-Reply-To: Content-Type: multipart/alternative; boundary="------------050609070401020304070809" Message-ID: <4ddeba69$0$302$14726298@news.sunsite.dk> NNTP-Posting-Host: 206.248.171.217 X-Trace: news.sunsite.dk DXC=M5kFOYi7FVMSi^`20K04QCYSB=nbEKnkK^3MDKh_O22GPPfk^U[HX;ON1>V8bAJTIN3eOPKWXldeDQa4_jgFW[9OogI7@?CZMjBd<glen herrmannsfeldt wrote: >>In alt.sys.pdp11 Jerome H. Fine wrote: > >(snip) > > >>I made some modifications to MACRO-11 which counts the >>number of times an overlay is read into memory in addition >>to the number of times the overlay is called - the difference >>being the number of times the overlay was called, but was >>already memory. The numbers are displayed at the end >>of the listing along with the elapsed time. >> >> >I used to know how the overlay for OS/360 worked. I believe >it is only two instructions if the segment is already in >memory. It uses self-modifying code to write the load and >branch instructions to not call the overlay handler. >(Branch to an arbitrary address takes two instructions, >load the address into a register, and then branch.) > > I just looked again at the RT-11 overlay handler for low memory overlays. The exact instruction count is 15 instructions in total (including the instruction which CALLs the instruction which CALLs the overlay handler with the required arguments) when the subroutine is in an overlay which is already in memory. 15 instructions includes a redundant PUSH and POP of R0 when the overlay is in memory - although it was convenient to keep them in order to use R0 as the base address of the table which keeps track of the number of times an overlay is CALLed. The code is also self modifying, but ONLY the very first time an overlay segment is CALLed so that all of the memory used by overlays can be zeroed. The method adds an extra CALL instruction, but reduces overall code size when many calls are made to the same subroutine in an overlay. >I do remember using the RT-11 overlay system with Fortran, >but not how many instructions it took. I would think it could >use something similar to the self modifying branch, though. > The overlay handler code is identical no matter which language is used. The instruction used to CALL the instruction which CALLs the overlay handler with the correct arguments is also compatible with FORTRAN conventions as well as every other language since other than the initial CALL instruction, everything else is hidden from the user application program. Jerome Fine --------------050609070401020304070809 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit >glen herrmannsfeldt wrote:
>In alt.sys.pdp11 Jerome H. Fine <everyone@nospam.com> wrote:

(snip)
  
I made some modifications to MACRO-11 which counts the
number of times an overlay is read into memory in addition
to the number of times the overlay is called - the difference
being the number of times the overlay was called, but was
already memory.  The numbers are displayed at the end
of the listing along with the elapsed time.
    
I used to know how the overlay for OS/360 worked.  I believe
it is only two instructions if the segment is already in
memory.  It uses self-modifying code to write the load and
branch instructions to not call the overlay handler.
(Branch to an arbitrary address takes two instructions,
load the address into a register, and then branch.)
  
I just looked again at the RT-11 overlay handler for low memory
overlays.  The exact instruction count is 15 instructions in
total (including the instruction which CALLs the instruction
which CALLs the overlay handler with the required arguments)
when the subroutine is in an overlay which is already in memory.
15 instructions includes a redundant PUSH and POP of R0
when the overlay is in memory - although it was convenient to
keep them in order to use R0 as the base address of the table
which keeps track of the number of times an overlay is CALLed.

The code is also self modifying, but ONLY the very first time
an overlay segment is CALLed so that all of the memory used
by overlays can be zeroed.

The method adds an extra CALL instruction, but reduces overall
code size when many calls are made to the same subroutine in
an overlay.
I do remember using the RT-11 overlay system with Fortran,
but not how many instructions it took.  I would think it could
use something similar to the self modifying branch, though.
The overlay handler code is identical no matter which language
is used.  The instruction used to CALL the instruction which
CALLs the overlay handler with the correct arguments is
also compatible with FORTRAN conventions as well as
every other language since other than the initial CALL instruction,
everything else is hidden from the user application program.

Jerome Fine
--------------050609070401020304070809--