Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

060797,000002:                                                                                                  ## Copyright:   Public domain.
060798,000003:                                                                                                  ## Filename:    DAP_INTERFACE_SUBROUTINES.agc
060799,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
060800,000005:                                                                                                  ##              It is part of the source code for the original release
060801,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
060802,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
060803,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
060804,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
060805,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
060806,000011:                                                                                                  ##              that the code format has been changed to conform to the
060807,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
060808,000013:                                                                                                  ##              original YUL assembler.
060809,000014:                                                                                                  ## Reference:   pp. 1401-1404
060810,000015:                                                                                                  ## Assembler:   yaYUL
060811,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
060812,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
060813,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
060814,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
060815,000020:                                                                                                  ##              2016-12-24 RRB  Updated for Luminary 69.
060816,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
060817,000022:                                                                                                  ##                              but no errors found.
060818,000023:                                                                                                  ##              2017-03-10 RSB  Comment-text fixes noted in proofing Luminary 116.
060819,000024: 

Page 1401

060821,000026: 20,2123                                           BANK     20                                    
060822,000027: 20,2000                                           SETLOC   DAPS3                                 
060823,000028: 20,2000                                           BANK                                           
060824,000029: 
060825,000030: 20,2123  E6,1633                                  EBANK=   CDUXD                                 
060826,000031: 20,2123                                           COUNT*   $$/DAPIF                              
060827,000032: 
060828,000033:                                                                                                  #  MOD 0         DATE    11/15/66        BY GEORGE W. CHERRY
060829,000034:                                                                                                  #  MOD 1                  1/23/67        MODIFICATION BY PETER ADLER
060830,000035: 
060831,000036:                                                                                                  #  FUNCTIONAL DESCRIPTION
060832,000037:                                                                                                  #        HEREIN ARE A COLLECTION OF SUBROUTINES WHICH ALLOW MISSION CONTROL PROGRAMS TO CONTROL THE MODE
060833,000038:                                                                                                  #        AND INTERFACE WITH THE DAP.
060834,000039: 
060835,000040:                                                                                                  #  CALLING SEQUENCES
060836,000041:                                                                                                  #        IN INTERRUPT OR WITH INTERRUPT INHIBITED
060837,000042:                                                                                                  #                TC      IBNKCALL
060838,000043:                                                                                                  #                FCADR   ROUTINE
060839,000044:                                                                                                  #        IN A JOB WITHOUT INTERRUPT INHIBITED
060840,000045:                                                                                                  #                INHINT
060841,000046:                                                                                                  #                TC      IBNKCALL
060842,000047:                                                                                                  #                FCADR   ROUTINE
060843,000048:                                                                                                  #                RELINT
060844,000049: 
060845,000050:                                                                                                  #  OUTPUT
060846,000051:                                                                                                  #        SEE INDIVIDUAL ROUTINES BELOW
060847,000052: 
060848,000053:                                                                                                  #  DEBRIS
060849,000054:                                                                                                  #        A, L, AND SOMETIMES MDUETEMP                    ODE     NOT IN PULSES MODE
060850,000055: 

Page 1402

060852,000057:                                                                                                  #  SUBROUTINE NAMES:
060853,000058:                                                                                                  #        SETMAXDB, SETMINDB, RESTORDB, PFLITEDB
060854,000059:                                                                                                  #  MODIFIED:     30 JANUARY 1968 BY P S WEISSMAN TO CREATE RESTORDB.
060855,000060:                                                                                                  #  MODIFIED:     1 MARCH 1968 BY P S WEISSMAN TO SAVE EBANK AND CREATE PFLITEDB
060856,000061: 
060857,000062:                                                                                                  #  FUNCTIONAL DESCRIPTION:
060858,000063:                                                                                                  #        SETMAXDB - SET DEADBAND TO 5.0 DEGREES
060859,000064:                                                                                                  #        SETMINDB - SET DEADBAND TO 0.3 DEGREE
060860,000065:                                                                                                  #        RESTORDB - SET DEADBAND TO MAX OR MIN ACCORDING TO SETTING OF DBSELECT BIT OF DAPBOOLS
060861,000066:                                                                                                  #        PFLITEDB - SET DEADBAND TO 1.0 DEGREE AND ZERO THE COMMANDED ATTITUDE CHANGE AND COMMANDED RATE
060862,000067: 
060863,000068:                                                                                                  #        ALL ENTRIES SET UP A NOVAC JOB TO DO 1/ACCS SO THAT THE TJETLAW SWITCH CURVES ARE POSITIONED TO
060864,000069:                                                                                                  #        REFLECT THE NEW DEADBAND.  IT SHOULD BE NOTED THAT THE DEADBAND REFERS TO THE ATTITUDE IN THE P-, U-, AND V-AXES.
060865,000070: 
060866,000071:                                                                                                  #  SUBROUTINE CALLED:    NOVAC
060867,000072: 
060868,000073:                                                                                                  #  CALLING SEQUENCE:     SAME AS ABOVE
060869,000074:                                                                                                  #                        OR      TC RESTORDB +1    FROM ALLCOAST
060870,000075: 
060871,000076:                                                                                                  #  DEBRIS:               A, L, Q, RUPTREG1, (ITEMPS IN NOVAC)
060872,000077: 
060873,000078: 20,2123           30111        RESTORDB           CAE      DAPBOOLS                              #  DETERMINE CREW-SELECTED DEADBAND.
060874,000079: 20,2124           74750                           MASK     DBSELECT                              
060875,000080: 20,2125           00006                           EXTEND                                         
060876,000081: 20,2126           12140                           BZF      SETMINDB                              
060877,000082: 
060878,000083: 20,2127           32151        SETMAXDB           CAF      WIDEDB                                #  SET 5 DEGREE DEADBAND.
060879,000084: 20,2130           55346                 +1        TS       DB                                    
060880,000085: 
060881,000086: 20,2131           00006                           EXTEND                                         #  SET UP JOB TO RE-POSITION SWITCH CURVES.
060882,000087: 20,2132           22070                           QXCH     RUPTREG1                              
060883,000088: 20,2133           37714        CALLACCS           CAF      PRIO27                                
060884,000089: 20,2134           05072                           TC       NOVAC                                 
060885,000090: 20,2135  E6,1537                                  EBANK=   AOSQ                                  
060886,000091: 20,2135           02454 40106                     2CADR    1/ACCJOB                              
060887,000092: 
060888,000093: 20,2137           00070                           TC       RUPTREG1                              #  RETURN TO CALLER.
060889,000094: 
060890,000095: 20,2140           32150        SETMINDB           CAF      NARROWDB                              #  SET 0.3 DEGREE DEADBAND.
060891,000096: 20,2141           12130                           TCF      SETMAXDB   +1                         
060892,000097: 
060893,000098: 20,2142           00006        PFLITEDB           EXTEND                                         #  THE RETURN FROM CALLACCS IS TO RUPTREG1.
060894,000099: 20,2143           22070                           QXCH     RUPTREG1                              
060895,000100: 20,2144           02153                           TC       ZATTEROR                              #  ZERO THE ERRORS AND COMMANDED RATES.
060896,000101: 20,2145           32152                           CAF      POWERDB                               #  SET DB TO 1.0 DEG.
060897,000102: 20,2146           55346                           TS       DB                                    
060898,000103: 20,2147           12133                           TCF      CALLACCS                              #  SET UP 1/ACCS AND RETURN TO CALLER.
060899,000104: 20,2150           00155        NARROWDB           OCTAL    00155                                 #  0.3 DEGREE SCALED AT 45.

Page 1403

060901,000106: 20,2151           03434        WIDEDB             OCTAL    03434                                 #  5.0 DEGREES SCALED AT 45.
060902,000107: 20,2152           00554        POWERDB            DEC      .02222                                #  1.0 DEGREE SCALED AT 45.
060903,000108: 
060904,000109: 20,2153           35015        ZATTEROR           CAF      EBANK6                                
060905,000110: 20,2154           56003                           XCH      EBANK                                 
060906,000111: 20,2155           54001                           TS       L                                     #  SAVE CALLERS EBANK IN L.
060907,000112: 20,2156           30032                           CAE      CDUX                                  
060908,000113: 20,2157           55633                           TS       CDUXD                                 
060909,000114: 20,2160           30033                           CAE      CDUY                                  
060910,000115: 20,2161           55634                           TS       CDUYD                                 
060911,000116: 20,2162           30034                           CAE      CDUZ                                  
060912,000117: 20,2163           55635                           TS       CDUZD                                 
060913,000118: 20,2164           12170                           TCF      STOPRATE   +3                         
060914,000119: 
060915,000120: 20,2165           35015        STOPRATE           CAF      EBANK6                                
060916,000121: 20,2166           56003                           XCH      EBANK                                 
060917,000122: 20,2167           54001                           TS       L                                     #  SAVE CALLERS EBANK IN L.
060918,000123: 20,2170           34755                 +3        CAF      ZERO                                  
060919,000124: 20,2171           55641                           TS       OMEGAPD                               
060920,000125: 20,2172           55642                           TS       OMEGAQD                               
060921,000126: 20,2173           55643                           TS       OMEGARD                               
060922,000127: 20,2174           55636                           TS       DELCDUX                               
060923,000128: 20,2175           55637                           TS       DELCDUY                               
060924,000129: 20,2176           55640                           TS       DELCDUZ                               
060925,000130: 20,2177           55277                           TS       DELPEROR                              
060926,000131: 20,2200           55300                           TS       DELQEROR                              
060927,000132: 20,2201           55301                           TS       DELREROR                              
060928,000133: 20,2202           22003                           LXCH     EBANK                                 #  RESTORE CALLERS EBANK.
060929,000134: 20,2203           00002                           TC       Q                                     
060930,000135: 
060931,000136:                                                                                                  #  SUBROUTINE NAME:      ALLCOAST
060932,000137:                                                                                                  #  WILL BE CALLED BY FRESH STARTS AND ENGINE OFF ROUTINES.               .
060933,000138: 
060934,000139:                                                                                                  #  CALLING SEQUENCE:     (SAME AS ABOVE)
060935,000140: 
060936,000141:                                                                                                  #  EXIT:                 RETURN TO Q.
060937,000142: 
060938,000143:                                                                                                  #  SUBROUTINES CALLED:   STOPRATE, RESTORDB, NOVAC
060939,000144: 
060940,000145:                                                                                                  #  ZERO:                 (FOR ALL AXES) AOS, ALPHA, AOSTERM, OMEGAD, DELCDU, DELEROR
060941,000146: 
060942,000147:                                                                                                  #  OUTPUT:               DRIFTBIT/DAPBOOLS, DB, JOB TO DO 1/ACCS
060943,000148: 
060944,000149:                                                                                                  #  DEBRIS:               A, L, Q, RUPTREG1, RUPTREG2, (ITEMPS IN NOVAC)
060945,000150: 
060946,000151: 20,2204           00006        ALLCOAST           EXTEND                                         #  SAVE Q FOR RETURN
060947,000152: 20,2205           22071                           QXCH     RUPTREG2                              

Page 1404

060949,000154: 20,2206           02165                           TC       STOPRATE                              #  CLEAR RATE INTERFACE.  RETURN WITH A=0
060950,000155: 20,2207           22003                           LXCH     EBANK                                 #  AND L=EBANK6.  SAVE CALLERS EBANK.
060951,000156: 20,2210           55537                           TS       AOSQ                                  
060952,000157: 20,2211           55540                           TS       AOSQ       +1                         
060953,000158: 20,2212           55541                           TS       AOSR                                  
060954,000159: 20,2213           55542                           TS       AOSR       +1                         
060955,000160: 20,2214           55422                           TS       ALPHAQ                                #  FOR DOWNLIST.
060956,000161: 20,2215           55423                           TS       ALPHAR                                
060957,000162: 20,2216           55545                           TS       AOSQTERM                              
060958,000163: 20,2217           55546                           TS       AOSRTERM                              
060959,000164: 20,2220           22003                           LXCH     EBANK                                 #  RESTORE EBANK (EBANK6 NO LONGER NEEDED)
060960,000165: 
060961,000166: 20,2221           40111                           CS       DAPBOOLS                              #  SET UP DRIFTBIT
060962,000167: 20,2222           74744                           MASK     DRIFTBIT                              
060963,000168: 20,2223           26111                           ADS      DAPBOOLS                              
060964,000169: 20,2224           02124                           TC       RESTORDB   +1                         #  RESTORE DEADBANK TO CREW-SELECTED VALUE.
060965,000170: 
060966,000171: 20,2225           00071                           TC       RUPTREG2                              #  RETURN.
060967,000172: 

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