Source Code

This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure!

015210,000002:                                                                                                  ## Copyright:   Public domain.
015211,000003:                                                                                                  ## Filename:    SYSTEM_TEST_STANDARD_LEAD_INS.agc
015212,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
015213,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
015214,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
015215,000007:                                                                                                  ## Assembler:   yaYUL
015216,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
015217,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
015218,000010:                                                                                                  ## Pages:       370-372
015219,000011:                                                                                                  ## Mod history: 2009-05-17 RSB  Adapted from the corresponding 
015220,000012:                                                                                                  ##                              Luminary131 file, using page 
015221,000013:                                                                                                  ##                              images from Luminary 1A.
015222,000014:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
015223,000015:                                                                                                  ##                              and corrected the errors found.
015224,000016:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
015225,000017:                                                                                                  ##              2017-03-07 RSB  Comment-text fixes noted in proofing Luminary 116.
015226,000018: 

Page 370

015228,000020: 22,3242  E5,1642                                  EBANK=   XSM                                   
015229,000021: 
015230,000022: 33,2045                                           BANK     33                                    
015231,000023: 04,2000                                           SETLOC   E/PROG                                
015232,000024: 04,2000                                           BANK                                           
015233,000025: 
015234,000026: 04,2576                                           COUNT*   $$/P07                                
015235,000027: 
015236,000028:                                                                                                  #  SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
015237,000029: 
015238,000030:                                                                                                  #  E/BKCALL      FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
015239,000031: 
015240,000032:                                                                                                  #  THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED.  LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
015241,000033:                                                                                                  #  IS NOT POSSIBLE.
015242,000034: 
015243,000035:                                                                                                  #  THE CALLING SEQUENCE IS:
015244,000036: 
015245,000037:                                                                                                  #        TC      BANKCALL
015246,000038:                                                                                                  #        CADR    E/BKCALL
015247,000039:                                                                                                  #        CADR    ROUTINE         WHERE YOU WANT TO GO IN FIXED.
015248,000040:                                                                                                  #        RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
015249,000041:                                                                                                  #        RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
015250,000042:                                                                                                  #        RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
015251,000043: 
015252,000044:                                                                                                  #  THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
015253,000045:                                                                                                  #  OTHER EMEMORY PROGRAMS.
015254,000046: 
015255,000047:                                                                                                  #  A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
015256,000048: 
015257,000049: 04,2576           52134        E/BKCALL           DXCH     BUF2                                  #  SAVE A,L AND GET DP RETURN.
015258,000050: 04,2577           53170                           DXCH     EBUF2                                 #  SAVE DP RETURN.
015259,000051: 04,2600           25167                           INCR     EBUF2                                 #  RETURN +1 BECAUSE DOUBLE CADR.
015260,000052: 04,2601           30006                           CA       BBANK                                 
015261,000053: 04,2602           75012                           MASK     LOW10                                 #  GET CURRENT EBANK.  (SBANK SOMEDAY)
015262,000054: 04,2603           27170                           ADS      EBUF2      +1                         #  FORM BBCON.  (WAS FBANK)
015263,000055: 04,2604           51167                           NDX      EBUF2                                 
015264,000056: 04,2605           27777                           CA       0          -1                         #  GET CADR OF ROUTINE.
015265,000057: 04,2606           04622                           TC       SWCALL                                #  GO TO ROUTINE, SETTING Q TO SWRETURN
015266,000058:                                                                                                  #  AND RESTORING A + L.
015267,000059: 04,2607           02613                           TC       +4                                    #  TX Q, V34, OR BAD STALL RETURN.
015268,000060: 04,2610           02612                           TC       +2                                    #  PROCEED OR GOOD STALL RETURN.
015269,000061: 04,2611           25167                           INCR     EBUF2                                 #  ENTER OR RECYCLE RETURN.
015270,000062: 04,2612           25167                           INCR     EBUF2                                 
015271,000063: 04,2613           53170        E/SWITCH           DXCH     EBUF2                                 
015272,000064: 04,2614           52006                           DTCB                                           
015273,000065: 

Page 371

015275,000067:                                                                                                  #  E/CALL        FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
015276,000068: 
015277,000069:                                                                                                  #  THE CALLING SEQUENCE IS...
015278,000070: 
015279,000071:                                                                                                  #        RTB
015280,000072:                                                                                                  #                E/CALL
015281,000073:                                                                                                  #        CADR    ROUTINE                 THE INTERPRETIVE SUBROUTINE YOU WANT.
015282,000074:                                                                                                  #                                        RETURNS HERE IN INTERPRETIVE.
015283,000075: 
015284,000076: 04,2615           22164        E/CALL             LXCH     LOC                                   #  ADRES -1 OF CADR.
015285,000077: 04,2616           50001                           INDEX    L                                     
015286,000078: 04,2617           30001                           CA       L                                     #  CADR IN A.
015287,000079: 04,2620           24001                           INCR     L                                     
015288,000080: 04,2621           24001                           INCR     L                                     #  RETURN ADRES IN L.
015289,000081: 04,2622           53170                           DXCH     EBUF2                                 #  STORE CADR AND RETURN.
015290,000082: 04,2623           06037                           TC       INTPRET                               
015291,000083: 04,2624           77624                           CALL                                           
015292,000084: 04,2625           01167                                    EBUF2                                 #  INDIRECTLY EXECUTE ROUTINE.  IT MUST
015293,000085: 04,2626           77776                           EXIT                                           #  LEAVE VIA RVQ OR EQUIVALENT.
015294,000086: 04,2627           23170                           LXCH     EBUF2      +1                         #  PICK UP RETURN.
015295,000087: 04,2630           16041                           TCF      INTPRET    +2                         #  SET LOC AND RETURN TO CALLER.
015296,000088: 

Page 372

015298,000090:                                                                                                  #  E/JOBWAK      FOR WAKING UP ERASABLE MEMORY JOBS.
015299,000091: 
015300,000092:                                                                                                  #  THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
015301,000093: 
015302,000094:                                                                                                  #  THE CALLING SEQUENCE IS:
015303,000095: 
015304,000096:                                                                                                  #        INHINT
015305,000097:                                                                                                  #          .
015306,000098:                                                                                                  #          .
015307,000099:                                                                                                  #        CA      WAKEADR         ADDRESS OF SLEEPING JOB
015308,000100:                                                                                                  #        TC      IBNKCALL
015309,000101:                                                                                                  #        CADR    E/JOBWAK
015310,000102:                                                                                                  #          .                     RETURNS HERE
015311,000103:                                                                                                  #          .
015312,000104:                                                                                                  #          .
015313,000105:                                                                                                  #        RELINT                  IF YOU DID AN INHINT.
015314,000106: 
015315,000107: 33,2045                                           BANK     33                                    
015316,000108: 04,2000                                           SETLOC   E/PROG                                
015317,000109: 04,2000                                           BANK                                           
015318,000110: 
015319,000111: 04,2631                                           COUNT*   $$/P07                                
015320,000112: 
015321,000113: 04,2631           05137        E/JOBWAK           TC       JOBWAKE                               #  ARRIVE IWTH ADRES IN A.
015322,000114: 04,2632           44741                           CS       BIT11                                 
015323,000115: 04,2633           50064                           NDX      LOCCTR                                
015324,000116: 04,2634           26164                           ADS      LOC                                   #  KNOCK FIXED MEMORY BIT OUT OF ADRES.
015325,000117: 04,2635           00072                           TC       RUPTREG3                              #  RETURN
015326,000118: 

End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc.  Parent file is MAIN.agc