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!

059219,000002:                                                                                                  ## Copyright:   Public domain.
059220,000003:                                                                                                  ## Filename:    DAP_INTERFACE_SUBROUTINES.agc
059221,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
059222,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
059223,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
059224,000007:                                                                                                  ## Assembler:   yaYUL
059225,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059226,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
059227,000010:                                                                                                  ## Pages:       1406-1409
059228,000011:                                                                                                  ## Mod history: 2009-05-10 SN   (Sergio Navarro).  Started adapting
059229,000012:                                                                                                  ##                              from the Luminary131/ file of the same
059230,000013:                                                                                                  ##                              name, using Luminary099 page images.
059231,000014:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
059232,000015:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
059233,000016:                                                                                                  ##                              and corrected the errors found.
059234,000017:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
059235,000018:                                                                                                  ##              2017-03-10 RSB  Comment-text fixes noted in proofing Luminary 116.
059236,000019: 

Page 1406

059238,000021: 20,2123                                           BANK     20                                    
059239,000022: 20,2000                                           SETLOC   DAPS3                                 
059240,000023: 20,2000                                           BANK                                           
059241,000024: 
059242,000025: 20,2123  E6,1635                                  EBANK=   CDUXD                                 
059243,000026: 20,2123                                           COUNT*   $$/DAPIF                              
059244,000027: 
059245,000028:                                                                                                  #  MOD 0         DATE    11/15/66        BY GEORGE W. CHERRY
059246,000029:                                                                                                  #  MOD 1                  1/23/67        MODIFICATION BY PETER ADLER
059247,000030: 
059248,000031:                                                                                                  #  FUNCTIONAL DESCRIPTION
059249,000032:                                                                                                  #        HEREIN ARE A COLLECTION OF SUBROUTINES WHICH ALLOW MISSION CONTROL PROGRAMS TO CONTROL THE MODE
059250,000033:                                                                                                  #        AND INTERFACE WITH THE DAP.
059251,000034: 
059252,000035:                                                                                                  #  CALLING SEQUENCES
059253,000036:                                                                                                  #        IN INTERRUPT OR WITH INTERRUPT INHIBITED
059254,000037:                                                                                                  #                TC      IBNKCALL
059255,000038:                                                                                                  #                FCADR   ROUTINE
059256,000039:                                                                                                  #        IN A JOB WITHOUT INTERRUPT INHIBITED
059257,000040:                                                                                                  #                INHINT
059258,000041:                                                                                                  #                TC      IBNKCALL
059259,000042:                                                                                                  #                FCADR   ROUTINE
059260,000043:                                                                                                  #                RELINT
059261,000044: 
059262,000045:                                                                                                  #  OUTPUT
059263,000046:                                                                                                  #        SEE INDIVIDUAL ROUTINES BELOW
059264,000047: 
059265,000048:                                                                                                  #  DEBRIS
059266,000049:                                                                                                  #        A, L, AND SOMETIMES MDUETEMP                    ODE     NOT IN PULSES MODE
059267,000050: 

Page 1407

059269,000052:                                                                                                  #  SUBROUTINE NAMES:
059270,000053:                                                                                                  #        SETMAXDB, SETMINDB, RESTORDB, PFLITEDB
059271,000054:                                                                                                  #  MODIFIED:     30 JANUARY 1968 BY P S WEISSMAN TO CREATE RESTORDB.
059272,000055:                                                                                                  #  MODIFIED:     1 MARCH 1968 BY P S WEISSMAN TO SAVE EBANK AND CREATE PFLITEDB
059273,000056: 
059274,000057:                                                                                                  #  FUNCTIONAL DESCRIPTION:
059275,000058:                                                                                                  #        SETMAXDB - SET DEADBAND TO 5.0 DEGREES
059276,000059:                                                                                                  #        SETMINDB - SET DEADBAND TO 0.3 DEGREE
059277,000060:                                                                                                  #        RESTORDB - SET DEADBAND TO MAX OR MIN ACCORDING TO SETTING OF DBSELECT BIT OF DAPBOOLS
059278,000061:                                                                                                  #        PFLITEDB - SET DEADBAND TO 1.0 DEGREE AND ZERO THE COMMANDED ATTITUDE CHANGE AND COMMANDED RATE
059279,000062: 
059280,000063:                                                                                                  #        ALL ENTRIES SET UP A NOVAC JOB TO DO 1/ACCS SO THAT THE TJETLAW SWITCH CURVES ARE POSITIONED TO
059281,000064:                                                                                                  #        REFLECT THE NEW DEADBAND.  IT SHOULD BE NOTED THAT THE DEADBAND REFERS TO THE ATTITUDE IN THE P-, U-, AND V-AXES.
059282,000065: 
059283,000066:                                                                                                  #  SUBROUTINE CALLED:    NOVAC
059284,000067: 
059285,000068:                                                                                                  #  CALLING SEQUENCE:     SAME AS ABOVE
059286,000069:                                                                                                  #                        OR      TC RESTORDB +1    FROM ALLCOAST
059287,000070: 
059288,000071:                                                                                                  #  DEBRIS:               A, L, Q, RUPTREG1, (ITEMPS IN NOVAC)
059289,000072: 
059290,000073: 20,2123           30111        RESTORDB           CAE      DAPBOOLS                              #  DETERMINE CREW-SELECTED DEADBAND.
059291,000074: 20,2124           74750                           MASK     DBSELECT                              
059292,000075: 20,2125           00006                           EXTEND                                         
059293,000076: 20,2126           12140                           BZF      SETMINDB                              
059294,000077: 
059295,000078: 20,2127           32151        SETMAXDB           CAF      WIDEDB                                #  SET 5 DEGREE DEADBAND.
059296,000079: 20,2130           55346                 +1        TS       DB                                    
059297,000080: 
059298,000081: 20,2131           00006                           EXTEND                                         #  SET UP JOB TO RE-POSITION SWITCH CURVES.
059299,000082: 20,2132           22070                           QXCH     RUPTREG1                              
059300,000083: 20,2133           37715        CALLACCS           CAF      PRIO27                                
059301,000084: 20,2134           05072                           TC       NOVAC                                 
059302,000085: 20,2135  E6,1537                                  EBANK=   AOSQ                                  
059303,000086: 20,2135           02454 40106                     2CADR    1/ACCJOB                              
059304,000087: 
059305,000088: 20,2137           00070                           TC       RUPTREG1                              #  RETURN TO CALLER.
059306,000089: 
059307,000090: 20,2140           32150        SETMINDB           CAF      NARROWDB                              #  SET 0.3 DEGREE DEADBAND.
059308,000091: 20,2141           12130                           TCF      SETMAXDB   +1                         
059309,000092: 
059310,000093: 20,2142           00006        PFLITEDB           EXTEND                                         #  THE RETURN FROM CALLACCS IS TO RUPTREG1.
059311,000094: 20,2143           22070                           QXCH     RUPTREG1                              
059312,000095: 20,2144           02153                           TC       ZATTEROR                              #  ZERO THE ERRORS AND COMMANDED RATES.
059313,000096: 20,2145           32152                           CAF      POWERDB                               #  SET DB TO 1.0 DEG.
059314,000097: 20,2146           55346                           TS       DB                                    
059315,000098: 20,2147           12133                           TCF      CALLACCS                              #  SET UP 1/ACCS AND RETURN TO CALLER.
059316,000099: 20,2150           00155        NARROWDB           OCTAL    00155                                 #  0.3 DEGREE SCALED AT 45.

Page 1408

059318,000101: 20,2151           03434        WIDEDB             OCTAL    03434                                 #  5.0 DEGREES SCALED AT 45.
059319,000102: 20,2152           00554        POWERDB            DEC      .02222                                #  1.0 DEGREE SCALED AT 45.
059320,000103: 
059321,000104: 20,2153           35015        ZATTEROR           CAF      EBANK6                                
059322,000105: 20,2154           56003                           XCH      EBANK                                 
059323,000106: 20,2155           54001                           TS       L                                     #  SAVE CALLERS EBANK IN L.
059324,000107: 20,2156           30032                           CAE      CDUX                                  
059325,000108: 20,2157           55635                           TS       CDUXD                                 
059326,000109: 20,2160           30033                           CAE      CDUY                                  
059327,000110: 20,2161           55636                           TS       CDUYD                                 
059328,000111: 20,2162           30034                           CAE      CDUZ                                  
059329,000112: 20,2163           55637                           TS       CDUZD                                 
059330,000113: 20,2164           12170                           TCF      STOPRATE   +3                         
059331,000114: 
059332,000115: 20,2165           35015        STOPRATE           CAF      EBANK6                                
059333,000116: 20,2166           56003                           XCH      EBANK                                 
059334,000117: 20,2167           54001                           TS       L                                     #  SAVE CALLERS EBANK IN L.
059335,000118: 20,2170           34755                 +3        CAF      ZERO                                  
059336,000119: 20,2171           55643                           TS       OMEGAPD                               
059337,000120: 20,2172           55644                           TS       OMEGAQD                               
059338,000121: 20,2173           55645                           TS       OMEGARD                               
059339,000122: 20,2174           55640                           TS       DELCDUX                               
059340,000123: 20,2175           55641                           TS       DELCDUY                               
059341,000124: 20,2176           55642                           TS       DELCDUZ                               
059342,000125: 20,2177           55277                           TS       DELPEROR                              
059343,000126: 20,2200           55300                           TS       DELQEROR                              
059344,000127: 20,2201           55301                           TS       DELREROR                              
059345,000128: 20,2202           22003                           LXCH     EBANK                                 #  RESTORE CALLERS EBANK.
059346,000129: 20,2203           00002                           TC       Q                                     
059347,000130: 
059348,000131:                                                                                                  #  SUBROUTINE NAME:      ALLCOAST
059349,000132:                                                                                                  #  WILL BE CALLED BY FRESH STARTS AND ENGINE OFF ROUTINES.               .
059350,000133: 
059351,000134:                                                                                                  #  CALLING SEQUENCE:     (SAME AS ABOVE)
059352,000135: 
059353,000136:                                                                                                  #  EXIT:                 RETURN TO Q.
059354,000137: 
059355,000138:                                                                                                  #  SUBROUTINES CALLED:   STOPRATE, RESTORDB, NOVAC
059356,000139: 
059357,000140:                                                                                                  #  ZERO:                 (FOR ALL AXES) AOS, ALPHA, AOSTERM, OMEGAD, DELCDU, DELEROR
059358,000141: 
059359,000142:                                                                                                  #  OUTPUT:               DRIFTBIT/DAPBOOLS, DB, JOB TO DO 1/ACCS
059360,000143: 
059361,000144:                                                                                                  #  DEBRIS:               A, L, Q, RUPTREG1, RUPTREG2, (ITEMPS IN NOVAC)
059362,000145: 
059363,000146: 20,2204           00006        ALLCOAST           EXTEND                                         #  SAVE Q FOR RETURN
059364,000147: 20,2205           22071                           QXCH     RUPTREG2                              

Page 1409

059366,000149: 20,2206           02165                           TC       STOPRATE                              #  CLEAR RATE INTERFACE.  RETURN WITH A=0
059367,000150: 20,2207           22003                           LXCH     EBANK                                 #  AND L=EBANK6.  SAVE CALLERS EBANK.
059368,000151: 20,2210           55537                           TS       AOSQ                                  
059369,000152: 20,2211           55540                           TS       AOSQ       +1                         
059370,000153: 20,2212           55541                           TS       AOSR                                  
059371,000154: 20,2213           55542                           TS       AOSR       +1                         
059372,000155: 20,2214           55424                           TS       ALPHAQ                                #  FOR DOWNLIST.
059373,000156: 20,2215           55425                           TS       ALPHAR                                
059374,000157: 20,2216           55545                           TS       AOSQTERM                              
059375,000158: 20,2217           55546                           TS       AOSRTERM                              
059376,000159: 20,2220           22003                           LXCH     EBANK                                 #  RESTORE EBANK (EBANK6 NO LONGER NEEDED)
059377,000160: 
059378,000161: 20,2221           40111                           CS       DAPBOOLS                              #  SET UP DRIFTBIT
059379,000162: 20,2222           74744                           MASK     DRIFTBIT                              
059380,000163: 20,2223           26111                           ADS      DAPBOOLS                              
059381,000164: 20,2224           02124                           TC       RESTORDB   +1                         #  RESTORE DEADBANK TO CREW-SELECTED VALUE.
059382,000165: 
059383,000166: 20,2225           00071                           TC       RUPTREG2                              #  RETURN.
059384,000167: 

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