Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.space.policy > #57030

Re: Apollo 11 source code released

From Niklas Holsti <niklas.holsti@tidorum.invalid>
Newsgroups sci.space.policy
Subject Re: Apollo 11 source code released
Date 2016-07-15 22:26 +0300
Organization Tidorum Ltd
Message-ID <dusrnlFgghrU1@mid.individual.net> (permalink)
References (6 earlier) <MPG.31ee0992edd41c3798979c@news.eternal-september.org> <dul2o9Fk2rpU1@mid.individual.net> <ld5bobdj2t0nfdvi14d2e6f2b72q9oj3b4@4ax.com> <dune04F6p46U1@mid.individual.net> <200eob9fi8bb0fcuct3hg17vepcr910olv@4ax.com>

Show all headers | View raw


On 16-07-14 06:06 , Fred J. McCall wrote:
> Niklas Holsti <niklas.holsti@tidorum.invalid> wrote:
>
>> On 16-07-13 04:14 , Fred J. McCall wrote:
>>> Niklas Holsti <niklas.holsti@tidorum.invalid> wrote:
>>>
>>>> On 16-07-12 03:53 , Jeff Findley wrote:
>>>>> In article <duhkokFondfU1@mid.individual.net>,
>>>>> niklas.holsti@tidorum.invalid says...
>>>>>> But the Wikipedia entry also says this:
>>>>>>
>>>>>> "The AGC also had a sophisticated software interpreter, developed by the
>>>>>> MIT Instrumentation Laboratory, that implemented a virtual machine with
>>>>>> more complex and capable pseudo-instructions than the native AGC. These
>>>>>> instructions simplified the navigational programs. Interpreted code,
>>>>>> which featured double precision trigonometric, scalar and vector
>>>>>> arithmetic (16 and 24-bit), even an MXV (matrix × vector) instruction,
>>>>>> could be mixed with native AGC code. While the execution time of the
>>>>>> pseudo-instructions was increased (due to the need to interpret these
>>>>>> instructions at runtime) the interpreter provided many more instructions
>>>>>> than AGC natively supported and the memory requirements were much lower
>>>>>> than in the case of adding these instructions to the AGC native language
>>>>>> which would require additional memory built into the computer (at that
>>>>>> time the memory capacity was very expensive)...."
>>>>>
>>>>> The examples given for functionality of the interpreted code bits sound
>>>>> an awful lot like subroutines.
>>>>
>>>> Yes, but the basic AGC instruction set seems IMO very unfriendly to
>>>> subroutines -- it is possible to call ("TC", "Transfer Control") a
>>>> subroutine and save the return address, but it would be quite difficult
>>>> or at least cumbersome to pass arguments, as there are no easy
>>>> base+offset addressing modes.
>>>>
>>>> The INDEX instruction can be used to build such addressing modes, but
>>>> one base+index computation would take several instructions and at least
>>>> one temporary memory location if both "base" and "index" are dynamic
>>>> (non-constant) values, as would often be the case for accessing
>>>> subroutine arguments that are vectors or arrays.
>>>>
>>>
>>> Easy enough to use something like FORTRAN Common to fake this.
>>
>> Fortran Common areas are global variables, not subroutine arguments that
>> can point to different variables on each call.
>>
>
> Yes, I know.  Here's how it would work.  Suppose I have three
> parameters, A, B, and C, for a function, X.  You build X to read the
> three values from some shared area (those 'global variables').  Right
> before a call to X, the caller sets the values of the three parameters
> in Common to the values desired.  X reads those values and runs with
> them, changes them if that is desire behaviour, writes a functional
> return value to Common, whatever.  When X returns, the caller go reads
> the values X set and moves on.  Rinse and repeat.  The only difference
> is that instead of the compiler managing everything on the stack frame
> for you and having rules about whether you're calling by reference or
> by value, you do all that manually around the call to X.
>
> This is dirt simple to do.  I shouldn't have to explain it.

Of course I know that global variables can be used to pass data into and 
out of subroutines, by copy-in and copy-out. I did not claim that 
subroutines are impossible on the AGC.

The problem is that the AGC has no register-indirect addressing mode, so 
pass-by-reference (pointers) is difficult, and the code to copy 
parameter values in and result values out is long and slow.

If the calling sequence is as long as the subroutine being called, there 
is no advantage to having a subroutine. This is independent of whether 
you write that code manually or have a compiler doing it.

You can use a memory location as a pointer, by the INDEX instruction, 
but this is very clumsy compared to the register-based indirect 
addressing modes in later computers.

The AGC HW architecture is so spartan that I well understand why they 
developed an interpretive virtual machine on top of it.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .

Back to sci.space.policy | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-10 12:43 -0400
  Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-10 20:33 +0300
    Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-10 18:28 -0400
      Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-10 21:27 -0400
      Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-11 00:36 -0700
        Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-11 06:44 -0400
          Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-11 16:20 +0300
            Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-11 20:53 -0400
              Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-12 14:36 -0400
                Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-12 18:11 -0700
              Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-12 23:37 +0300
                Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-12 18:14 -0700
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-13 21:01 +0300
                Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-13 20:06 -0700
                Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-14 06:44 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-15 23:54 +0300
                Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-17 11:49 -0400
                Re: Apollo 11 source code released William Mook <mokmedical@gmail.com> - 2016-07-17 18:41 -0700
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-18 09:20 +0300
                Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-14 11:38 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-16 00:10 +0300
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-15 22:26 +0300
                Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-20 10:49 -0700
              Re: Apollo 11 source code released Snidely <snidely.too@gmail.com> - 2016-07-14 09:12 -0700
          Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-11 11:51 -0400
            Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-12 02:19 +0300
              Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-11 20:58 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-12 09:24 +0300
                Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-12 10:10 -0700
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-13 21:07 +0300
                Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-13 20:08 -0700
                Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-14 11:25 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-15 22:39 +0300
                Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-20 10:40 -0700
                Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-12 14:41 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-12 23:26 +0300
                Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-12 21:41 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-13 08:54 +0300
                Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-13 06:43 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-13 21:08 +0300
                Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-14 11:34 -0400
                Re: Apollo 11 source code released Niklas Holsti <niklas.holsti@tidorum.invalid> - 2016-07-15 23:06 +0300
                Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-15 19:48 -0400
                Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-15 19:59 -0400
                Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-17 12:00 -0400
                Re: Apollo 11 source code released Jeff Findley <jfindley@cinci.nospam.rr.com> - 2016-07-17 12:14 -0400
                Re: Apollo 11 source code released JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-07-17 12:56 -0400
              Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-12 10:04 -0700
            Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-12 09:43 -0700
          Re: Apollo 11 source code released Alain Fournier <alain245@videotron.ca> - 2016-07-11 19:43 -0400
  Re: Apollo 11 source code released Fred J. McCall <fjmccall@gmail.com> - 2016-07-10 11:39 -0700
  Re: Apollo 11 source code released William Mook <mokmedical@gmail.com> - 2016-07-11 18:28 -0700

csiph-web